Torna al Thread
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ValidaTextBox() = False Then
MessageBox.Show("Compilare i campi correttamente")
Else
MessageBox.Show("Compilare i campi correttamente")
End If
End Sub
Function ValidaTextBox() As Boolean
ValidaTextBox = True
If TextBox1.Text = "" Then
TextBox1.BackColor = Color.Red
ValidaTextBox = False
End If
If TextBox1.Text = "" Then
TextBox2.BackColor = Color.Red
ValidaTextBox = False
End If
End Function