MsgBoxAdvanced



Public 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
' Call from within any form like this:

Call MessageBox(Me.hWnd, _
"This is a test in API Message Box", _
"API Message Box", vbInformation)
'To use this technique in VB3, declare all parameters in the API call as integer. While calling

'pass MB_ICONINFORMATION as the last parameter, instead of vbInformation. You can find

'the constant value for MB_ICONINFORMATION in the CONSTANT.txt file. Note that many of

'the intrinsic VB constants used with MsgBox also work with the MessageBox API. Now for

'the best news about this workaround-it's totally unnecessary under VB5! Timer (and other)

'events are never blocked by a MsgBox call when run from an EXE. It's important to

'understand that they'll still be blocked in the IDE, but take a look next time you compile and

'you'll see your clock just keeps on ticking.


(msgboxadvanced.html)- by Paolo Puglisi - Modifica del 25/3/2019