Hey guys,
I'm stuck with a really stupid problem. I'm trying to create a new top-level
menu item, just like "Tools" or "Edit". This is my code.
CommandBarControl objMenuItem = objDte.CommandBars["MenuBar"].Controls.Add(
vsCommandBarType.vsCommandBarTypePopup, null, null, null, null);
I'm getting the error message:
System.ArgumentException: The parameter is incorrect.
All the examples and documentation is for VB or VB.Net where you can neglect
optional parameters. I think the problem is that the method wants to have
something different then null.
Anybody any idea?
Thanks, Christoph
Carlos J. Quintero [.NET MVP] - 03 Feb 2005 09:47 GMT
Hi Christoph,
In C# try passing Type.Missing instead of null.

Signature
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
> Hey guys,
>
[quoted text clipped - 15 lines]
>
> Thanks, Christoph