E
elven byte
Hi everybody.
I'm making an application for a Symbol with keyboard, with Operating System
Windows Pocket PC 4.20, it has a keyboard incorporated (the one with the
rubber keyboard), and I'm making the application wit VB.NET with SP2
installed on it (it fixes some problems with this keyboard by the way).
Here you are the code piece with the exception handled:
Private Sub lstAccion_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles lstAccion.KeyDown
Try
If e.KeyData = Keys.Left Then
ButtonLeft_Click(sender, e)
End If
If e.KeyData = Keys.Right Then
ButtonRight_Click(sender, e)
End If
If e.KeyData = Keys.Enter Then
ButtonRight_Click(sender, e)
End If
Catch ex As NullReferenceException
MsgBox(ex.Message)
End Try
End Sub
The fact is that the line with the msgbox allways is executed, because the
exception raises, but in the other hand I've got another listbox exactly
with the same code, which runs just before this one.
I already don't know what to do, I've been looking for a solution the whole
Internet and I haven't found anything.
Can anybody help me?
Regards, David
I'm making an application for a Symbol with keyboard, with Operating System
Windows Pocket PC 4.20, it has a keyboard incorporated (the one with the
rubber keyboard), and I'm making the application wit VB.NET with SP2
installed on it (it fixes some problems with this keyboard by the way).
Here you are the code piece with the exception handled:
Private Sub lstAccion_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles lstAccion.KeyDown
Try
If e.KeyData = Keys.Left Then
ButtonLeft_Click(sender, e)
End If
If e.KeyData = Keys.Right Then
ButtonRight_Click(sender, e)
End If
If e.KeyData = Keys.Enter Then
ButtonRight_Click(sender, e)
End If
Catch ex As NullReferenceException
MsgBox(ex.Message)
End Try
End Sub
The fact is that the line with the msgbox allways is executed, because the
exception raises, but in the other hand I've got another listbox exactly
with the same code, which runs just before this one.
I already don't know what to do, I've been looking for a solution the whole
Internet and I haven't found anything.
Can anybody help me?
Regards, David