我有一個程序,我使用複雜的if語句。下面的if語句沒有正確處理:vb.net複雜if語句
如果form3上的textbox1.text中有數據,它從不處理第一個else語句,它就好像它退出sub。現在,如果form3 textbox1.text是空白的,它將處理messagebox if語句到底是如何寫入的。以下if語句有什麼不對?
If form3.TextBox1.Text = "" Then
Dim result1 As DialogResult = MessageBox.Show("Click OK to fill out user settings, or CANCEL to do it later", "Settings", MessageBoxButtons.OKCancel)
If result1 = Windows.Forms.DialogResult.OK Then
pwauthen.ShowDialog()
ElseIf result1 = Windows.Forms.DialogResult.Cancel Then
Exit Sub
Else
If TextBox1.Text = "" Then
MsgBox("Please describe the issue you're having Bender, I'm not a mindreader!")
Exit Sub
Else
.......Do a lot of other processing.....
End if
End if
End if