Option Explicit Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As LongPrivate Sub Command1_Click() MessageBox hwnd, "试验", "系统提示", vbOKCancel End SubPrivate Sub Command2_Click() MessageBox hwnd, "试验", "系统提示", vbYesNo End Sub
Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As LongPrivate Sub Command1_Click()
MessageBox hwnd, "试验", "系统提示", vbOKCancel
End SubPrivate Sub Command2_Click()
MessageBox hwnd, "试验", "系统提示", vbYesNo
End Sub
另一个显示yes和no