Created
December 12, 2013 17:36
-
-
Save jda0/7932043 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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