First of all I don't understand which button? Is it the <Enter> Button
on the keyboard or is it a button on the form?
if it's on the keybrd;
this can help you :
Private Sub detectenter(ByVal e As
System.Windows.Forms.KeyPressEventArgs)
Dim a As Char = e.KeyChar
Dim s As Object = a.GetHashCode
If s = 851981 Then 'if the pressed key is enter
messagebox.show("Enter pressed")
End If
End Sub
Private Sub TxtChatMain_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
detectenter(e)
End Sub