Adding right click context menu in VB.net

P

Preeti

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

Preeti
 
N

Newbie Coder

Preeti,

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. 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top