Private Sub btnMain_Click(sender As Object, e As EventArgs) Handles btnMain.Click
Dim result As DialogResult = MessageBox.Show("Did you save customer info?", "Save Information", MessageBoxButtons.YesNo, MessageBoxIcon.Stop)
If (result = DialogResult.Yes) Then
'Me.Visible = False
Me.Close()
frmDuneTours.Visible = True
ElseIf (result = DialogResult.No) Then
frmDuneTours.Visible = False
Me.Visible = True
End If
End Sub
答案 0 :(得分:0)
当你放置Me.Close之前 frmDuneTours.Visible = True 第二行永远不会执行,因为当你关闭当前表单时,应用程序结束。
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim result As DialogResult = MessageBox.Show("Did you save customer info?", "Save Information", MessageBoxButtons.YesNo, MessageBoxIcon.Stop)
If (result = DialogResult.Yes) Then
frmSortedList.Visible = True
Me.Close()
ElseIf (result = DialogResult.No) Then
frmSortedList.Visible = False
End If
End Sub