Re: Changing Character Entered
From: One Handed Man \( OHM - Terry Burns \) ("One)
Date: 07/07/04
- Next message: Dan: "Suggestions to increase the performance of searching my array?"
- Previous message: BrianDH: "Re: add handlers to textboxes in a datagrid"
- In reply to: Ricky W. Hunt: "Re: Changing Character Entered"
- Next in thread: Ricky W. Hunt: "Re: Changing Character Entered"
- Reply: Ricky W. Hunt: "Re: Changing Character Entered"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 7 Jul 2004 20:19:51 +0100
Easy . . . In each handler or in the form's keypress with KepPreview to on
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
If e.KeyChar = ChrW(Keys.Return) Then
SendKeys.Send("{TAB}")
End If
End Sub
-- OHM ( Terry Burns ) . . . One-Handed-Man . . . Time flies when you don't know what you're doing "Ricky W. Hunt" <rhunt22@hotmail.com> wrote in message news:BvWGc.41611$Oq2.16065@attbi_s52... > "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message > news:eov9ui$YEHA.3716@TK2MSFTNGP11.phx.gbl... > > Well firstly, there are two ways to handle this situation. You could > create > > a handler for the first text box and then add more handles statements for > > all the others you want this sub to handle ( 1 sub, handles all your txt > > boxes. ), or you can set the form to Preview in the properties, and check > > the keypress event for the form, this way you will trap all kepress events > > and the form previews them before passing them on the handler for the > > control that called them. > > Yes but how does the one sub know where to put the focus next? It doesn't > seem like I should have to write a Case statement with the sub for each box > just to set focus. Why isn't here some "generic" command that just says "set > focus to the next control according to tab order" or something to that > effect? > >
- Next message: Dan: "Suggestions to increase the performance of searching my array?"
- Previous message: BrianDH: "Re: add handlers to textboxes in a datagrid"
- In reply to: Ricky W. Hunt: "Re: Changing Character Entered"
- Next in thread: Ricky W. Hunt: "Re: Changing Character Entered"
- Reply: Ricky W. Hunt: "Re: Changing Character Entered"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|