Quantcast
Channel: Handle Enter KeyPress
Viewing all articles
Browse latest Browse all 14

Handle Enter KeyPress

$
0
0

PrivateSub Input_KeyPress(ByVal eventSenderAs System.Object,ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs)Handles Tb1.KeyPress, Tb2.KeyPress

       Const CR AsShort = 13 ' Carriage return

       Static KeyAscii AsShort

       KeyAscii = Asc(eventArgs.KeyChar)

       If KeyAscii = CR Then"Do Whatever"

       eventArgs.KeyChar = Chr(KeyAscii)

       If KeyAscii = 0 Then eventArgs.Handled =True

   EndSub

But what is it that you are doing and want to happen with this that is not occurring?

Renee


Viewing all articles
Browse latest Browse all 14

Trending Articles