I want to add a menu item to the context (right click) menu of the desktop. Anyone got an example of how to do this. Any help will be greatly appreciated.
Printable View
I want to add a menu item to the context (right click) menu of the desktop. Anyone got an example of how to do this. Any help will be greatly appreciated.
Create a menu (if you don't want it to be displayed in the top menubar, set the top level menu object's visible propertie to false).
Lets say mnuMyMenu is your top level menu object:
Would display all menu objects under the mnuMyMenu hiearchy (That have a visible property set to true that is..)Code:Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuMymenu
End If
End Sub
Hi Monte96.
That provides a context menu for the form in the current app, but does not help me append to the 'Windows Desktop context menu'. Thanks for responding, but ...
Anyone else got any ideas? Anyone?
[Edited by jcouture100 on 11-08-2000 at 07:43 PM]
I think you can add to the context menu for files and folders but I don't think you can add to the desktop context menu.. at least not in VB.. I just finished scouring MSDN for info on it.. nada. I wouldn't mind knowing this one as well if it is in fact possible. (I don't think I've ever seen additions to that particular context menu.)
Then how come programs can add their own document type to the "new" part of the desktop menu?
Into the new it's just a change to registry. Try searching for registry for the desktop context menu items (try any item name). If you can't find, try to find a document on how to add things to Windows menus via registry.
Hope this helps,
Yes, adding to the New portion is easy enough.. but adding to the top level desktop context menu I think is built in Windows functionality and not retrieved from the registry.
Regmon shows only a few registry hits on a desktop right click..