If (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Boş - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
ElseIf (Not String.IsNullOrEmpty(textBox1.Text)) AndAlso (Not String.IsNullOrEmpty(textBox2.Text)) Then
MessageBox.Show("1 Dolu - 2 Dolu", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("1 Boş - 2 Boş", "AccessTr.Net", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
İki tane metin kutusu : textBox1 ve textBox2 ekleyin. Bir buton ekleyin ve Click olayına yukarıdaki kodları yapıştırın. Tüm ihtimallere göre if yapınız bu şekildedir.