Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I've got the following code in the KeyPressed function of a Text Box:-

 

Dim KeyAscii As Integer

 

KeyAscii = Asc(e.KeyChar)

 

If KeyAscii = Asc(ControlChars.Cr) Then

Button1.Focus()

e.Handled = True

Me.Button1_Click()

Exit Sub

End If

 

Me.Button1_Click() does work! What do I need so that when I press enter after entering some text to then execute the code in button1.

 

Thanks for any and all help given.

Carl.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...