Home Archive Adding right click context menu in VB.net
|
|
Adding right click context menu in VB.net |
|
|
|
|
Adding right click context menu in VB.net Hi all
I am a fresher and have been given a requirement in VB.net I have to make an application in VB.net which will run as a system tray icon and will add one or two items in the default windows right clink context menu.
on clicking on that menu item the application should write a signature on the current cursor position
for example
if this application is running and user opens notepad / outlook new mail and right clicks anywhere the default windows context menu will appear with an additional menu item "Add signature"
and on cliking on this menu item a pre defined signature will be inserted to the current cursor position.
Does anyone knows how to go for it in VB.net
any help ?
thanks in advance
Add entries to Windows Explorer context (right-click) menu easily – How it may be done ? Add entries to Windows Explorer context menu easily with Windows Explorer Shell Context Menu. This powerful .Net component for your own, custom items appending to Windows Explorer Shell context menu will add all your custom entries to Windows Explorer context menu. This .Net component and VB.NET support include detailed C# and VB.NET samples, tutorials and support all you may need to add your entries to Explorer context menu : - Add all your items to Windows Explorer Shell context menu to be shown on any Windows OS (all OS are supported – Windows XP, Vista, x64 of all types , etc.)
- Add any type of items to Windows Explorer Shell context menu to be shown in any way - with your custom caption and your custom icon, as separator or sub-menu
- Add items to Explorer context menu to be shown for all types of files or shown only for computer files of particular type (for example, only for .PDF .TXT , .MP3,.WMA,.AAC , .AVI files)
- Add items to Windows Explorer context menu, sub-menus, sub-menus of unlimited depth and even much more
Windows Explorer Shell Context Menu - is a powerful .Net component that support all you may need to add your program items to Windows Explorer Shell context menu - in a fast and a very easy way. Add all your items to Explorer context menu right now – add items to context menu fast , easy and exactly as you want :
This is a similar thing what I asked before Christmas & no ones coding in this newsgroups was good enough for a solution.
The difference between your question & mine was that I wanted any application to minimize to the system tray & add an extra system menu item (2 actually as one was the seperator).
Basically you have to hook the keyboard... & get the handle of that context menu. Because this method works only for Windows 95 / Windows 98 (not on XP, Vista, x64 - 64-bit Windows), to add items to Windows Explorer Shell context menu you should use, according to Microsoft guidelines, appropriate .Net component - Windows Explorer Context Menu.Once you have that you can use AppendMenu API passing BYPOSITION constant adding the item. Then in WndProc handle the context menu message. That's the theory anyway. Luckily for me these was an article in unmanaged C++ that I converted to VB.NET to achieve the same result.
The best forum for answering this type of question was GotDotNet but they closed it down recently. At least then you had help of Microsoft too.
Sorry that I cannot be of any more help, but be assured you are wasting your time asking a question this complicated in here unless HERFRIED can use his Google Groups searching to come up with how to make an omlet (in Hebrew) then he'll post you that useless link.
Good luck & if you find the code then NEVER post the code for people like Herfried to copy, put on his website & call his own. You'll have many users like that around if you do post it
One last thing you could try:
If you have Visual Studio (not Express) then you can ask Microsoft 2 unpaid support questions, but you'll have to word your question into ONE full question because if its split into two then they will be pedantic & only answer one of them. |
|