By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,097 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,097 IT Pros & Developers. It's quick & easy.

How to use Right-Click of mouse & Function keys in my program?

P: 1
I want to use Right-Click menu of mouse in any form or anywhere in my program? How can I able to do this? I want that when user right-click on any button or form a special pop-up menu will appear with some extra options, whenever user click any option, it will work.

I also want to use the Function Keys in my program. Such as, whenever any user press F1, a new form will appear that describe about the software and help topics. For Function keys, there will be also some program. How can I wll do this?

Pls, help me in this regard. I need it very urgent.

Thanking u.
Mar 17 '07 #1
Share this Question
Share on Google+
2 Replies


vijaydiwakar
100+
P: 579
I want to use Right-Click menu of mouse in any form or anywhere in my program? How can I able to do this? I want that when user right-click on any button or form a special pop-up menu will appear with some extra options, whenever user click any option, it will work.

I also want to use the Function Keys in my program. Such as, whenever any user press F1, a new form will appear that describe about the software and help topics. For Function keys, there will be also some program. How can I wll do this?

Pls, help me in this regard. I need it very urgent.

Thanking u.
see dear this can be achived by no of ways like if u like to popup help on f1 then u've to create chm or hlp file and use its helpcontext id to pop up perticular help topic
or use keydown event of form
or u may use mousedown event and button parameter to do so
try it
Mar 17 '07 #2

Expert 5K+
P: 8,434
What version of VB are you using?

I'll assume for the moment that it's VB6. You can capture the function keys by setting the .KeyPreview p[roperty on your form(s) to True, then dealing with the key in the KeyDown or KeyPress event (I forget which).

As for the menu, look into the form's PopupMenu method.
Mar 19 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.