Hotkeys in VB 2005

How do i add a hotkey into my program for example i would like to have a mesage box pop up if Ctrl h is pressed.
[112 byte] By [dakota367] at [2007-12-24]
# 1
Set the form's KeyPreview property to true and add a KeyDown event handler to recognize the keystroke. For example:

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.H And e.Modifiers = Keys.Control Then
MsgBox("Nobugz waz here")
e.Handled = True
End If
End Sub

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

nobugz wrote:
Set the form's KeyPreview property to true and add a KeyDown event handler to recognize the keystroke. For example:

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.H And e.Modifiers = Keys.Control Then
MsgBox("Nobugz waz here")
e.Handled = True
End If
End Sub

question?

Nobugz,

This works okay in keys that were supported in e.keycode. What about keys that were NOT supported like "WindowsVista" key, "Record ",Channel +/-, Gadgets, "Live Call" hot key (or all custom hotkeys that are not supported, How do you capture them? these keys that were mentioned were NOT listed in keys.enumeration table.

thanks,

ernie

ErnieIII at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
There are a bunch of keys defined in the Keys enumeration that start with "Oem". To find the proper one, try running this code:

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Debug.Print(e.KeyCode.ToString())
End Sub

nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4

Hi,

See my code in this thread.>>

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1134317&SiteID=1

then add this somewhere in the Sub.>>

If e.KeyData.ToString="H, Control" Then

MsgBox("Hello dakota367")

EndIf

I like nobugz's answer at the top of this thread as it deals with the key and the modifier separately. :-)

There is less chance of getting the string wrong too.

Regards,

S_DS

Spidermans_DarkSide at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 5

Hi nobugz,

Below is your recommendation... I have tried it and did not fix the problem.

Using "ByVal e As System.Windows.Forms.KeyEventArgs" will not allow me to capture the media hotkeys like Keys.MediaVolumeUp/Down/play/stop & etc. I have to change it to ByVal e As KeyEventArgs to capture them...just to let you know that all the hotkeys listed in keys enumeration table, i donot have no problems capturing them..

but,

In regards to Media Center (Vista) key, Live CALL,Gadgets, 5 Favorites keys still cannot capture.No sign or any activities, no output what so ever when these keys are pressed.

The keyboard shortkey for Media Center key is: WIN+ALT+Enter but I need the Vk_code for me to capture it.

YOU can duplicate this by using one of the new Microsoft model 7000-8000 keyboards or any keyboard that have these keys.

thank you,

ernie

''' THis is the listing !!!!

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Public Class Form1

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

TextBox1.Select()

End Sub

' Private Sub TEXTBOX1_KeyDown(ByVal sender As Object, ByVal e As system.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown

Private Sub TEXTBOX1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles TextBox1.KeyDown

TextBox2.Text = ""

TextBox3.Text = ""

TextBox2.Text = TextBox2.Text & e.KeyCode.ToString()

End Sub

Private Sub TextBox1_Keyup(ByVal sender As Object, ByVal e As KeyEventArgs) Handles TextBox1.KeyUp

TextBox3.Text = TextBox3.Text & e.KeyCode.ToString()

End Sub

End Class
ErnieIII at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 6

hi Spiderman,

i also tried your code and same results that got from Mr, nobugz still cannot capture them.i also added what you ask me . again no activities at all and t does not execute the part what you told me to add.

thank you.

i really appreciate your help and Mr. Nobugz..

thanks

ErnieIII at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 7

ErnieIII wrote:

hi Spiderman,

i also tried your code and same results that got from Mr, nobugz still cannot capture them.i also added what you ask me . again no activities at all and t does not execute the part what you told me to add.

thank you.

i really appreciate your help and Mr. Nobugz..

thanks

but still I need your help to figure this one out !!!!


Here what I did also, I have generated a code that will list all the keys that are supported in Visual Basic and below is the results ( and I would like to share it to anyone who can use it. Keep it mind I did not type this. I did let the computer does it for me... and Ive noticed that i can only capture 0 255(FFhex) . Here is Another question.... How do capture a keys that has a value of greater than 255 (FF hex) ... . Those are the HOTKEYS that I'm interested ... with E0 extra code. Please if any one knows HELP me ... Thank you!!

Public Const VK_1 As Integer = 1 ' <1> <&H1 >_ < LButton >
Public Const VK_2 As Integer = 2 ' <2> <&H2 >_ < RButton >
Public Const VK_3 As Integer = 3 ' <3> <&H3 >_ < Cancel >
Public Const VK_4 As Integer = 4 ' <4> <&H4 >_ < MButton >
Public Const VK_5 As Integer = 5 ' <5> <&H5 >_ < XButton1 >
Public Const VK_6 As Integer = 6 ' <6> <&H6 >_ < XButton2 >
Public Const VK_7 As Integer = 7 ' <7> <&H7 >_ < LButton, XButton2 >
Public Const VK_8 As Integer = 8 ' <8> <&H8 >_ < Back >
Public Const VK_9 As Integer = 9 ' <9> <&H9 >_ < Tab >
Public Const VK_a As Integer = 10 ' <10> <&Ha >_ < LineFeed >
Public Const VK_b As Integer = 11 ' <11> <&Hb >_ < LButton, LineFeed >
Public Const VK_c As Integer = 12 ' <12> <&Hc >_ < Clear >
Public Const VK_d As Integer = 13 ' <13> <&Hd >_ < Return >
Public Const VK_e As Integer = 14 ' <14> <&He >_ < RButton, Clear >
Public Const VK_f As Integer = 15 ' <15> <&Hf >_ < RButton, Return >
Public Const VK_10 As Integer = 16 ' <16> <&H10 >_ < ShiftKey, Shift >
Public Const VK_11 As Integer = 17 ' <17> <&H11 >_ < ControlKey, Control >
Public Const VK_12 As Integer = 18 ' <18> <&H12 >_ < Menu, Alt >
Public Const VK_1c As Integer = 28 ' <28> <&H1c >_ < IMEConvert >
Public Const VK_1d As Integer = 29 ' <29> <&H1d >_ < IMENonconvert >
Public Const VK_1e As Integer = 30 ' <30> <&H1e >_ < IMEAceept >
Public Const VK_1f As Integer = 31 ' <31> <&H1f >_ < IMEModeChange >
Public Const VK_20 As Integer = 32 ' <32> <&H20 >_ < Space >
Public Const VK_21 As Integer = 33 ' <33> <&H21 >_ < PageUp >
Public Const VK_22 As Integer = 34 ' <34> <&H22 >_ < Next >
Public Const VK_23 As Integer = 35 ' <35> <&H23 >_ < End >
Public Const VK_24 As Integer = 36 ' <36> <&H24 >_ < Home >
Public Const VK_25 As Integer = 37 ' <37> <&H25 >_ < Left >
Public Const VK_26 As Integer = 38 ' <38> <&H26 >_ < Up >
Public Const VK_27 As Integer = 39 ' <39> <&H27 >_ < Right >
Public Const VK_28 As Integer = 40 ' <40> <&H28 >_ < Down >
Public Const VK_29 As Integer = 41 ' <41> <&H29 >_ < Select >
Public Const VK_2a As Integer = 42 ' <42> <&H2a >_ < Print >
Public Const VK_2b As Integer = 43 ' <43> <&H2b >_ < Execute >
Public Const VK_2d As Integer = 45 ' <45> <&H2d >_ < Insert >
Public Const VK_2e As Integer = 46 ' <46> <&H2e >_ < Delete >
Public Const VK_2f As Integer = 47 ' <47> <&H2f >_ < Help >
Public Const VK_30 As Integer = 48 ' <48> <&H30 >_ < D0 >
Public Const VK_31 As Integer = 49 ' <49> <&H31 >_ < D1 >
Public Const VK_32 As Integer = 50 ' <50> <&H32 >_ < D2 >
Public Const VK_33 As Integer = 51 ' <51> <&H33 >_ < D3 >
Public Const VK_34 As Integer = 52 ' <52> <&H34 >_ < D4 >
Public Const VK_35 As Integer = 53 ' <53> <&H35 >_ < D5 >
Public Const VK_36 As Integer = 54 ' <54> <&H36 >_ < D6 >
Public Const VK_37 As Integer = 55 ' <55> <&H37 >_ < D7 >
Public Const VK_38 As Integer = 56 ' <56> <&H38 >_ < D8 >
Public Const VK_39 As Integer = 57 ' <57> <&H39 >_ < D9 >
Public Const VK_3a As Integer = 58 ' <58> <&H3a >_ < RButton, D8 >
Public Const VK_3b As Integer = 59 ' <59> <&H3b >_ < RButton, D9 >
Public Const VK_3c As Integer = 60 ' <60> <&H3c >_ < MButton, D8 >
Public Const VK_3d As Integer = 61 ' <61> <&H3d >_ < MButton, D9 >
Public Const VK_3e As Integer = 62 ' <62> <&H3e >_ < XButton2, D8 >
Public Const VK_3f As Integer = 63 ' <63> <&H3f >_ < XButton2, D9 >
Public Const VK_40 As Integer = 64 ' <64> <&H40 >_ < 64 >
Public Const VK_41 As Integer = 65 ' <65> <&H41 >_ < A >
Public Const VK_42 As Integer = 66 ' <66> <&H42 >_ < B >
Public Const VK_43 As Integer = 67 ' <67> <&H43 >_ < C >
Public Const VK_44 As Integer = 68 ' <68> <&H44 >_ < D >
Public Const VK_45 As Integer = 69 ' <69> <&H45 >_ < E >
Public Const VK_46 As Integer = 70 ' <70> <&H46 >_ < F >
Public Const VK_47 As Integer = 71 ' <71> <&H47 >_ < G >
Public Const VK_48 As Integer = 72 ' <72> <&H48 >_ < H >
Public Const VK_49 As Integer = 73 ' <73> <&H49 >_ < I >
Public Const VK_4a As Integer = 74 ' <74> <&H4a >_ < J >
Public Const VK_4b As Integer = 75 ' <75> <&H4b >_ < K >
Public Const VK_4c As Integer = 76 ' <76> <&H4c >_ < L >
Public Const VK_4d As Integer = 77 ' <77> <&H4d >_ < M >
Public Const VK_4e As Integer = 78 ' <78> <&H4e >_ < N >
Public Const VK_4f As Integer = 79 ' <79> <&H4f >_ < O >
Public Const VK_50 As Integer = 80 ' <80> <&H50 >_ < P >
Public Const VK_51 As Integer = 81 ' <81> <&H51 >_ < Q >
Public Const VK_52 As Integer = 82 ' <82> <&H52 >_ < R >
Public Const VK_53 As Integer = 83 ' <83> <&H53 >_ < S >
Public Const VK_54 As Integer = 84 ' <84> <&H54 >_ < T >
Public Const VK_55 As Integer = 85 ' <85> <&H55 >_ < U >
Public Const VK_56 As Integer = 86 ' <86> <&H56 >_ < V >
Public Const VK_57 As Integer = 87 ' <87> <&H57 >_ < W >
Public Const VK_58 As Integer = 88 ' <88> <&H58 >_ < X >
Public Const VK_59 As Integer = 89 ' <89> <&H59 >_ < Y >
Public Const VK_5a As Integer = 90 ' <90> <&H5a >_ < Z >
Public Const VK_5b As Integer = 91 ' <91> <&H5b >_ < LWin >
Public Const VK_5d As Integer = 93 ' <93> <&H5d >_ < Apps >
Public Const VK_5e As Integer = 94 ' <94> <&H5e >_ < RButton, RWin >
Public Const VK_5f As Integer = 95 ' <95> <&H5f >_ < Sleep >
Public Const VK_60 As Integer = 96 ' <96> <&H60 >_ < NumPad0 >
Public Const VK_61 As Integer = 97 ' <97> <&H61 >_ < NumPad1 >
Public Const VK_62 As Integer = 98 ' <98> <&H62 >_ < NumPad2 >
Public Const VK_63 As Integer = 99 ' <99> <&H63 >_ < NumPad3 >
Public Const VK_64 As Integer = 100 ' <100> <&H64 >_ < NumPad4 >
Public Const VK_65 As Integer = 101 ' <101> <&H65 >_ < NumPad5 >
Public Const VK_66 As Integer = 102 ' <102> <&H66 >_ < NumPad6 >
Public Const VK_67 As Integer = 103 ' <103> <&H67 >_ < NumPad7 >
Public Const VK_68 As Integer = 104 ' <104> <&H68 >_ < NumPad8 >
Public Const VK_69 As Integer = 105 ' <105> <&H69 >_ < NumPad9 >
Public Const VK_6a As Integer = 106 ' <106> <&H6a >_ < Multiply >
Public Const VK_6b As Integer = 107 ' <107> <&H6b >_ < Add >
Public Const VK_6c As Integer = 108 ' <108> <&H6c >_ < Separator >
Public Const VK_6d As Integer = 109 ' <109> <&H6d >_ < Subtract >
Public Const VK_6e As Integer = 110 ' <110> <&H6e >_ < Decimal >
Public Const VK_6f As Integer = 111 ' <111> <&H6f >_ < Divide >
Public Const VK_70 As Integer = 112 ' <112> <&H70 >_ < F1 >
Public Const VK_71 As Integer = 113 ' <113> <&H71 >_ < F2 >
Public Const VK_72 As Integer = 114 ' <114> <&H72 >_ < F3 >
Public Const VK_73 As Integer = 115 ' <115> <&H73 >_ < F4 >
Public Const VK_74 As Integer = 116 ' <116> <&H74 >_ < F5 >
Public Const VK_75 As Integer = 117 ' <117> <&H75 >_ < F6 >
Public Const VK_76 As Integer = 118 ' <118> <&H76 >_ < F7 >
Public Const VK_77 As Integer = 119 ' <119> <&H77 >_ < F8 >
Public Const VK_78 As Integer = 120 ' <120> <&H78 >_ < F9 >
Public Const VK_79 As Integer = 121 ' <121> <&H79 >_ < F10 >
Public Const VK_88 As Integer = 136 ' <136> <&H88 >_ < Back, F17 >
Public Const VK_89 As Integer = 137 ' <137> <&H89 >_ < Back, F18 >
Public Const VK_8a As Integer = 138 ' <138> <&H8a >_ < Back, F19 >
Public Const VK_8b As Integer = 139 ' <139> <&H8b >_ < Back, F20 >
Public Const VK_8c As Integer = 140 ' <140> <&H8c >_ < Back, F21 >
Public Const VK_8d As Integer = 141 ' <141> <&H8d >_ < Back, F22 >
Public Const VK_8e As Integer = 142 ' <142> <&H8e >_ < Back, F23 >
Public Const VK_8f As Integer = 143 ' <143> <&H8f >_ < Back, F24 >
Public Const VK_90 As Integer = 144 ' <144> <&H90 >_ < NumLock >
Public Const VK_91 As Integer = 145 ' <145> <&H91 >_ < Scroll >
Public Const VK_92 As Integer = 146 ' <146> <&H92 >_ < RButton, NumLock >
Public Const VK_93 As Integer = 147 ' <147> <&H93 >_ < RButton, Scroll >
Public Const VK_94 As Integer = 148 ' <148> <&H94 >_ < MButton, NumLock >
Public Const VK_95 As Integer = 149 ' <149> <&H95 >_ < MButton, Scroll >
Public Const VK_96 As Integer = 150 ' <150> <&H96 >_ < XButton2, NumLock >
Public Const VK_97 As Integer = 151 ' <151> <&H97 >_ < XButton2, Scroll >
Public Const VK_98 As Integer = 152 ' <152> <&H98 >_ < Back, NumLock >
Public Const VK_99 As Integer = 153 ' <153> <&H99 >_ < Back, Scroll >
Public Const VK_9a As Integer = 154 ' <154> <&H9a >_ < LineFeed, NumLock >
Public Const VK_9b As Integer = 155 ' <155> <&H9b >_ < LineFeed, Scroll >
Public Const VK_9c As Integer = 156 ' <156> <&H9c >_ < Clear, NumLock >
Public Const VK_9d As Integer = 157 ' <157> <&H9d >_ < Clear, Scroll >
Public Const VK_9e As Integer = 158 ' <158> <&H9e >_ < RButton, Clear, NumLock >
Public Const VK_9f As Integer = 159 ' <159> <&H9f >_ < RButton, Clear, Scroll >
Public Const VK_a0 As Integer = 160 ' <160> <&Ha0 >_ < ShiftKey, Shift >
Public Const VK_a1 As Integer = 161 ' <161> <&Ha1 >_ < ShiftKey, Shift >
Public Const VK_a2 As Integer = 162 ' <162> <&Ha2 >_ < ControlKey, Control >
Public Const VK_a3 As Integer = 163 ' <163> <&Ha3 >_ < ControlKey, Control >
Public Const VK_a4 As Integer = 164 ' <164> <&Ha4 >_ < Menu, Alt >
Public Const VK_b8 As Integer = 184 ' <184> <&Hb8 >_ < Back, MediaNextTrack >
Public Const VK_b9 As Integer = 185 ' <185> <&Hb9 >_ < Back, MediaPreviousTrack >
Public Const VK_ba As Integer = 186 ' <186> <&Hba >_ < Oem1 >
Public Const VK_bb As Integer = 187 ' <187> <&Hbb >_ < Oemplus >
Public Const VK_bc As Integer = 188 ' <188> <&Hbc >_ < Oemcomma >
Public Const VK_bd As Integer = 189 ' <189> <&Hbd >_ < OemMinus >
Public Const VK_be As Integer = 190 ' <190> <&Hbe >_ < OemPeriod >
Public Const VK_bf As Integer = 191 ' <191> <&Hbf >_ < OemQuestion >
Public Const VK_c0 As Integer = 192 ' <192> <&Hc0 >_ < Oemtilde >
Public Const VK_c1 As Integer = 193 ' <193> <&Hc1 >_ < LButton, Oemtilde >
Public Const VK_c2 As Integer = 194 ' <194> <&Hc2 >_ < RButton, Oemtilde >
Public Const VK_c3 As Integer = 195 ' <195> <&Hc3 >_ < Cancel, Oemtilde >
Public Const VK_c4 As Integer = 196 ' <196> <&Hc4 >_ < MButton, Oemtilde >
Public Const VK_c5 As Integer = 197 ' <197> <&Hc5 >_ < XButton1, Oemtilde >
Public Const VK_c6 As Integer = 198 ' <198> <&Hc6 >_ < XButton2, Oemtilde >
Public Const VK_c7 As Integer = 199 ' <199> <&Hc7 >_ < LButton, XButton2, Oemtilde >
Public Const VK_c8 As Integer = 200 ' <200> <&Hc8 >_ < Back, Oemtilde >
Public Const VK_c9 As Integer = 201 ' <201> <&Hc9 >_ < Tab, Oemtilde >
Public Const VK_ca As Integer = 202 ' <202> <&Hca >_ < LineFeed, Oemtilde >
Public Const VK_cb As Integer = 203 ' <203> <&Hcb >_ < LButton, LineFeed, Oemtilde >
Public Const VK_cc As Integer = 204 ' <204> <&Hcc >_ < Clear, Oemtilde >
Public Const VK_cd As Integer = 205 ' <205> <&Hcd >_ < Return, Oemtilde >
Public Const VK_ce As Integer = 206 ' <206> <&Hce >_ < RButton, Clear, Oemtilde >
Public Const VK_cf As Integer = 207 ' <207> <&Hcf >_ < RButton, Return, Oemtilde >
Public Const VK_d0 As Integer = 208 ' <208> <&Hd0 >_ < ShiftKey, Oemtilde >
Public Const VK_d1 As Integer = 209 ' <209> <&Hd1 >_ < ControlKey, Oemtilde >
Public Const VK_d2 As Integer = 210 ' <210> <&Hd2 >_ < Menu, Oemtilde >
Public Const VK_d3 As Integer = 211 ' <211> <&Hd3 >_ < Pause, Oemtilde >
Public Const VK_d4 As Integer = 212 ' <212> <&Hd4 >_ < Capital, Oemtilde >
Public Const VK_d5 As Integer = 213 ' <213> <&Hd5 >_ < KanaMode, Oemtilde >
Public Const VK_d6 As Integer = 214 ' <214> <&Hd6 >_ < RButton, Capital, Oemtilde >
Public Const VK_d7 As Integer = 215 ' <215> <&Hd7 >_ < JunjaMode, Oemtilde >
Public Const VK_d8 As Integer = 216 ' <216> <&Hd8 >_ < FinalMode, Oemtilde >
Public Const VK_d9 As Integer = 217 ' <217> <&Hd9 >_ < HanjaMode, Oemtilde >
Public Const VK_da As Integer = 218 ' <218> <&Hda >_ < RButton, FinalMode, Oemtilde >
Public Const VK_db As Integer = 219 ' <219> <&Hdb >_ < OemOpenBrackets >
Public Const VK_dc As Integer = 220 ' <220> <&Hdc >_ < Oem5 >
Public Const VK_dd As Integer = 221 ' <221> <&Hdd >_ < Oem6 >
Public Const VK_de As Integer = 222 ' <222> <&Hde >_ < Oem7 >
Public Const VK_df As Integer = 223 ' <223> <&Hdf >_ < Oem8 >
Public Const VK_e0 As Integer = 224 ' <224> <&He0 >_ < Space, Oemtilde >
Public Const VK_e1 As Integer = 225 ' <225> <&He1 >_ < PageUp, Oemtilde >
Public Const VK_e2 As Integer = 226 ' <226> <&He2 >_ < OemBackslash >
Public Const VK_e3 As Integer = 227 ' <227> <&He3 >_ < LButton, OemBackslash >
Public Const VK_e4 As Integer = 228 ' <228> <&He4 >_ < D0 >
Public Const VK_e4 As Integer = 228 ' <228> <&He4 >_ < D0 >
Public Const VK_e5 As Integer = 229 ' <229> <&He5 >_ < ProcessKey >
Public Const VK_e6 As Integer = 230 ' <230> <&He6 >_ < MButton, OemBackslash >
Public Const VK_e7 As Integer = 231 ' <231> <&He7 >_ < Packet >
Public Const VK_e8 As Integer = 232 ' <232> <&He8 >_ < Down, Oemtilde >
Public Const VK_e9 As Integer = 233 ' <233> <&He9 >_ < Select, Oemtilde >
Public Const VK_ea As Integer = 234 ' <234> <&Hea >_ < Back, OemBackslash >
Public Const VK_eb As Integer = 235 ' <235> <&Heb >_ < Tab, OemBackslash >
Public Const VK_ec As Integer = 236 ' <236> <&Hec >_ < PrintScreen, Oemtilde >
Public Const VK_ed As Integer = 237 ' <237> <&Hed >_ < Back, ProcessKey >
Public Const VK_ee As Integer = 238 ' <238> <&Hee >_ < Clear, OemBackslash >
Public Const VK_ef As Integer = 239 ' <239> <&Hef >_ < Back, Packet >
Public Const VK_f0 As Integer = 240 ' <240> <&Hf0 >_ < D0, Oemtilde >
Public Const VK_f1 As Integer = 241 ' <241> <&Hf1 >_ < D1, Oemtilde >
Public Const VK_f2 As Integer = 242 ' <242> <&Hf2 >_ < ShiftKey, OemBackslash >
Public Const VK_f3 As Integer = 243 ' <243> <&Hf3 >_ < ControlKey, OemBackslash >
Public Const VK_f4 As Integer = 244 ' <244> <&Hf4 >_ < D4, Oemtilde >
Public Const VK_f5 As Integer = 245 ' <245> <&Hf5 >_ < ShiftKey, ProcessKey >
Public Const VK_f6 As Integer = 246 ' <246> <&Hf6 >_ < Attn >
Public Const VK_f7 As Integer = 247 ' <247> <&Hf7 >_ < Crsel >
Public Const VK_f8 As Integer = 248 ' <248> <&Hf8 >_ < Exsel >
Public Const VK_f9 As Integer = 249 ' <249> <&Hf9 >_ < EraseEof >
Public Const VK_fa As Integer = 250 ' <250> <&Hfa >_ < Play >
Public Const VK_fb As Integer = 251 ' <251> <&Hfb >_ < Zoom >
Public Const VK_fc As Integer = 252 ' <252> <&Hfc >_ < NoName >
Public Const VK_fd As Integer = 253 ' <253> <&Hfd >_ < Pa1 >
Public Const VK_fe As Integer = 254 ' <254> <&Hfe >_ < OemClear >
Public Const VK_ff As Integer = 255 ' <255> <&Hff >_ < LButton, OemClear
>

ErnieIII at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...