Display a message box using MessageBox API
Display a message box using MessageBox API
API Declarations
Private Const MB_OKCANCEL = &H1&
Private Const MB_OK = &H0&
Private Const MB_ABORTRETRYIGNORE = &H2&
Private Const MB_YESNOCANCEL = &H3&
Private Const MB_YESNO = &H4&
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 Long
Rate Display a message box using MessageBox API
(1(1 Vote))
Dim rval As Long
rval = MessageBox(Me.hwnd, "Hello.How r u?", "Test Message", MB_ABORTRETRYIGNORE)
Select Case rval
Case 1
MsgBox "Ok button Pressed"
Case 2
MsgBox "Cancel button Pressed"
Case 3
MsgBox "Abort button Pressed"
Case 4
MsgBox "Retry button Pressed"
Case 5
MsgBox "Ignore button Pressed"
Case 6
MsgBox "Yes button Pressed"
Case 7
MsgBox "No button Pressed"
End Select
End
End Sub
'Visit my Homepage at
'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Display a message box using MessageBox API Comments
No comments yet — be the first to post one!
Post a Comment