Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I am trying to capture the TAB key inside of a textbox. I used Key_Up, Key_Down and Keypress events to try an capture it. No go. Is there a way to do it?
Posted

sounds like a job for the api but.. i did find something interesting

 

check this out in the help files

http://ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemwindowsformsuicuesclasstopic.htm

 

 

the Control.ChangeUICues method seemed to be of interest

i'm not sure what to do with it but you can always experiment

 

i had typed some big jerry riggin way of doing it, then i found this method. if you'd like to hear my jerry riggin way let me know, just provide more details about what you are doing with the tab key so i can get it right.

 

here is the extreme short jerry rig example

 

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'use your imagination


End Sub

 

 

hope something in all of that junk helps

 

goodluck

brandon

i'm not lazy i'm just resting before i get tired.
Posted

Private Const WM_KEYDOWN As System.Int32 = &H100

Public Overrides Function PreProcessMessage(ByRef msg As System.Windows.Forms.Message) As Boolean
       Select Case msg.Msg
           Case WM_KEYDOWN
               Select Case msg.WParam.ToInt32
                   Case 9
                       'tab was entered
                       Exit Function

                   Case 13
                       'Enter()
                     
                       Exit Function
  
                   Case Else

                       MyBase.PreProcessMessage(msg)
                       Exit Function
               End Select

           Case Else
               MyBase.PreProcessMessage(msg)
               Exit Function
       End Select
   End Function

 

this should can you on the role :-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...