Capture <ctrl> t from a textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • LegalIT
    replied
    I figured it out from your suggestions. Thank you both!!!

    LegalIT

    Leave a comment:


  • Killer42
    replied
    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:


  • kadghar
    replied
    Originally posted by LegalIT
    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!

    Thanks
    Something like this in the KeyDown event will do:

    [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]

    HTH

    Leave a comment:


  • LegalIT
    started a topic Capture <ctrl> t from a textbox

    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!

    Thanks
Working...