I figured it out from your suggestions. Thank you both!!!
LegalIT
Capture <ctrl> t from a textbox
Collapse
X
-
If I'm not mistaken, that looks like VB6 code.
Anyway, don't forget that the accepted way to test bit positions within the Shift parameter is with AND, not =. For example...
[CODE=vb]If (Shift and VbCtrlMask) And KeyCode = Asc("T") Then ' Control T ...[/CODE]Leave a comment:
-
Something like this in the KeyDown event will do:Originally posted by LegalITHi,
I am trying to capture the sequence <ctrl> t from a textbox to automatically fill in the current date. I can see how to capture an individual character but I am having trouble catching the sequence.
I am using VB.net.
Any suggestions would be greatly appreciated!
Thanks
[CODE=vb]If Shift = 2 And KeyCode = Asc("T") Then
'code to fill the date, something like: textbox1.text=t extbox1.text & date
End If[/CODE]
HTHLeave a comment:
-
Capture <ctrl> t from a textbox
Hi,
I am trying to capture the sequence <ctrl> t from a textbox to automatically fill in the current date. I can see how to capture an individual character but I am having trouble catching the sequence.
I am using VB.net.
Any suggestions would be greatly appreciated!
ThanksTags: None
Leave a comment: