Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim a As String
a = TextBox1.Text
If a = "你好" Then
MsgBox("正确")
End If
MsgBox(a)
End Sub
'退出操作
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim close As DialogResult
close = MessageBox.Show("确认关闭吗", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk)
If close = Windows.Forms.MessageBoxButtons.YesNo Then
Me.Dispose()
Application.Exit()
Else
Me.Close()
End If
End Sub
End Class
更多推荐
VB菜鸟初学
发布评论