|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
No arrow keys ?Private Sub Form1_KeyDown(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles MyBase.KeyDown Dim myKey As Integer myKey = e.KeyValue MsgBox(myKey.ToString) End Sub all of my keyboard input is displayed in the MsgBox, However if I use any of the arrow keys the KeyDown event handler no longer works ! All keyboard input is no longer displayed in the MsgBox and the handler no longer works. How can I rewrite the code to handle arrow key input. Using Microsoft Development Environment 2002 Version 7.0.9955
Show quote
Hide quote
"Rob" <rls_***@worldnet.att.net> schrieb Are there controls on the form? Which control has the focus when you press > If I use the following code: > > Private Sub Form1_KeyDown(ByVal sender As Object, _ > ByVal e As System.Windows.Forms.KeyEventArgs) _ > Handles MyBase.KeyDown > > Dim myKey As Integer > > myKey = e.KeyValue > MsgBox(myKey.ToString) > > End Sub > > all of my keyboard input is displayed in the MsgBox, > However if I use any of the arrow keys the KeyDown > event handler no longer works ! All keyboard input is > no longer displayed in the MsgBox and the handler no > longer works. How can I rewrite the code to handle > arrow key input. Using Microsoft Development > Environment 2002 Version 7.0.9955 the arrow key? Armin Yes, there are 2 controls on the form. The form
contains a read only Text Box and a Button. Neither control has a Tab stop. I want to use the arrow keys to direct a cursor. The cursor is drawn on the desktop by means of a C++ DLL. Show quoteHide quote "Armin Zingler" <az.nospam@freenet.de> wrote in message news:eAML5C6TGHA.5172@TK2MSFTNGP12.phx.gbl... > "Rob" <rls_***@worldnet.att.net> schrieb > > If I use the following code: > > > > Private Sub Form1_KeyDown(ByVal sender As Object, _ > > ByVal e As System.Windows.Forms.KeyEventArgs) _ > > Handles MyBase.KeyDown > > > > Dim myKey As Integer > > > > myKey = e.KeyValue > > MsgBox(myKey.ToString) > > > > End Sub > > > > all of my keyboard input is displayed in the MsgBox, > > However if I use any of the arrow keys the KeyDown > > event handler no longer works ! All keyboard input is > > no longer displayed in the MsgBox and the handler no > > longer works. How can I rewrite the code to handle > > arrow key input. Using Microsoft Development > > Environment 2002 Version 7.0.9955 > > > Are there controls on the form? Which control has the focus when you press > the arrow key? > > > Armin >
Using My.settings in VB2005
DEADLINE! Please help! Remove not hide User Control, posting again Scroll on MouseWheel Event - VB.NET 1.1 ONE process at a time synchronized method in vb.net Datagridview requery MouseMove event not firing read excelfile with ADO Starting a console application from parameters |
|||||||||||||||||||||||