Skip to content

Instantly share code, notes, and snippets.

@jda0
Created December 12, 2013 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jda0/7932043 to your computer and use it in GitHub Desktop.
Save jda0/7932043 to your computer and use it in GitHub Desktop.
Public Class Form1
' Form Controls: Label LblContext, TextBox TbxInput, Button BtnSubmit
Dim _name As String = vbNull
Private Sub BtnSubmit_Click(sender As System.Object, e As System.EventArgs) Handles BtnSubmit.Click
If TbxInput.Text <> _name Then
If TbxInput.Text = "" Then
TbxInput.BackColor = Color.Yellow
MessageBox.Show("Please enter your name in the provided box", Application.ProductName)
Exit Sub
End If
LblOutput.Text = "Hello " + TbxInput.Text
_name = TbxInput.Text
End If
End Sub
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment