Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a back command to IE

Status
Not open for further replies.

dekken

MIS
Mar 11, 2002
11
US
I am trying to message keydown alt & left to IE, but can neither find the vb keycode for alt, nor am I sure that this will work correctly. If someone can offer some light regarding either my implementation or if someone has a better solution, please post. Thanks in advance.

-Joshua Cowhig
Net. Admin. -Joshua Cowhig
Net. Admin.
 
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

Keycode for Alt is 18
Shift is set bitwise
bit 1 = shift key
bit 2 = control key
bit 3 = Alt key
so if control and alt are hit together, shift returns 6

If you set KeyPreview = True for the Form, and Debug.print keycode in the formKeydown sub then you can find any Keycodes you need Let me know if this helps
NOSPAMjohnwm@btinternet.com______________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Thanks for the reply. Is the sub example meant to illustrate how to obtain keycodes only, or am I missing how this is applicable to sending IE the command alt & left? Thanks again. -Joshua Cowhig
Net. Admin.
 
Sub header was to show arguments

Rest was info on keycodes, shift codes and how to find any others

Your original post said 'but can neither find the vb keycode for alt,' and that's what I was trying to help with Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
That is what I had thought. Thanks for the reply. -Joshua Cowhig
Net. Admin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top