PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: JR Heathcote on March 20, 2006, 09:51:01 AM

Title: Multiple keypresses
Post by: JR Heathcote on March 20, 2006, 09:51:01 AM
I'm trying to trap multiple key presses like F3, CTRL + F3, SHIFT + F3, etc.  I'm using the following code in the KEYDOWN event for the affected control:


 Select Case nVirtKey
   Case %VK_F3           'Goto previous/next MAJOR option
 If (GetKeyState(%VK_CONTROL) And &H8000) <> 0 Then    'Ctrl + F3?
         Call ProcessVK_CONTROL_VK_F3(HWND_LV_EDIT, HWND_TB_TEXT)
 ElseIf (GetKeyState(%VK_SHIFT) And &H8000) <> 0 Then  'Shift + F3?
 
       Else
         Call ProcessVK_F3(HWND_LV_EDIT, HWND_TB_TEXT)
       End If

   Case Else
   
   
 End Select


But nothing happens.  Should this code be placed in another event? Or???
Title: Multiple keypresses
Post by: TechSupport on March 20, 2006, 10:17:05 PM
What control are you trying to trap the keypresses in ?  I created a sample application with a TextBox and your code catches the F3, Ctrl+F3, and Shift+F3 okay.