Umm I dont know if this might work for u but this code works to hold the f9 key down
in the general put this
[vb]Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const VK_F9 As Long = &H78
Const KEYEVENTF_KEYUP = &H2[/vb]
To hold the keydown put this
[vb]keybd_event VK_F9, 0, 0, 0[/vb]
to put keyup do this
[vb]keybd_event VK_F9, 0, KEYEVENTF_KEYUP, 0[/vb]
here a code i made sor ya

to see what i mean