I'm trying to catch non printing characters (like Delete, F5, Shifte F5, etc) when a user is typing into an Input Control. The sample code below doesn't work (the Input MsgBox only appears when the enter key is pressed and the Key Pressed MsgBox never appears). It appears to me this is because the Input Control doesn't send a GUI message every time a key stroke is received.
So my question is how can I capture individual key presses, including non printing ones, to an Input Control? Or should I be using a different control?
Thank you - Dick williams
#include
#include
$window = GUICreate("Test", 200, 100)
$inputBox = GUICtrlCreateInput ( "Input Box", 50, 50 , 100, 20)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $inputBox
MsgBox(0, "Input Box", "Case Executed")
If _IsPressed(75) Then
MsgBox(0, "Key Pressed", "F5")
EndIf
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd