Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I hide the VS shell menu?

25 views
Skip to first unread message

es...@ra.rockwell.co

unread,
Nov 7, 2012, 4:04:14 AM11/7/12
to
I want to hide the menu "Debug->Option and Settings" in VS2010.

I write code below, but I only disable this menu and not hide it. How can I hide this menu?

public int QueryStatus(ref Guid guidGroup, uint nCmdId, OLECMD[] oleCmd, IntPtr oleText)
{
int hr = 0;

for (uint i = 0; (i < oleCmd.Length) && hr >= 0; i++)
{
hr = (int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED;

if (oleCmd[i].cmdID ==(uint) 371)// 'Debug->Option and Settings' menu command id
{
oleCmd[i].cmdf =(uint)Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_INVISIBLE;
oleCmd[i].cmdf |= (uint)Microsoft.VisualStudio.OLE.Interop.OLECMDF.OLECMDF_SUPPORTED;
return VSConstants.S_OK;
}
}
return hr;
}
0 new messages