Why is the message displayed twice?
this is code :
this is code :
VB.NET:
Private Sub TabControl2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl2.SelectedIndexChanged
If txtName.Text = Nothing Then
TabControl2.SelectedIndex = 0
MessageBox.Show("برای نمایش و جستجوی بار ابتدا باید مشتری را انتخاب نمایید", "توجه", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)
Exit Sub
End If
End Sub