Phylum Posted December 4, 2003 Posted December 4, 2003 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? Quote
bpayne111 Posted December 5, 2003 Posted December 5, 2003 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 Quote i'm not lazy i'm just resting before i get tired.
*Gurus* divil Posted December 5, 2003 *Gurus* Posted December 5, 2003 Check out the IsInputKey method of the control, you might have to override that. If you're just trying to get the control to accept a tab as input, it should already have an AcceptsTab property. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Engine252 Posted December 5, 2003 Posted December 5, 2003 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 :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.