Code: Select all
ManagedMessageBox(x, y, title$, message$, flags, waitsecs, defbutton, forcetxt$, statusmask$)
Here's a little demo to run: http://www.networkmaestro.com/test_mmb.exe
Here's the sourcecode for the demo:
Code: Select all
Declare.s GetResult(a)
;position and wait
a = ManagedMessageBox(100,100,"Position and Wait - French","Would you like to donate $100 now to Bill Gates? ", #MB_ICONQUESTION|6, 5, 0, "Abandonner/Réessayer/Continuer", "/=")
ManagedMessageBox(0,0,"Notice","you chose "+getresult(a), 0, 1, 0, "", "/=")
; ;wait only
a = ManagedMessageBox(0,0,"Wait Only - German","How about Steve Ballmer? ", #MB_ICONQUESTION|#MB_YESNO, 5, 1, "Ja/Nein/Abbrechen", "Choosing/in/seconds...")
ManagedMessageBox(0,0,"Notice","you chose "+getresult(a), 0, 1, 0, "", "/=")
; ;position without wait
a = ManagedMessageBox(600,200,"Position only - Spanish","George Bush? (Better take some time to think about this one) ", #MB_ICONQUESTION|#MB_YESNOCANCEL, 0, 0, "Si/No/Cancelar", "/=")
ManagedMessageBox(0,0,"Notice","you chose "+getresult(a), 0, 1, 0, "", "/=")
End
Procedure.s GetResult(a)
Select a
Case 1 : a$="OK"
Case 2 : a$="Cancel"
Case 3 : a$="Abort"
Case 4 : a$="Retry"
Case 5 : a$="Ignore"
Case 6 : a$="Yes"
Case 7 : a$="No"
Case 8 : a$="Close"
Case 9 : a$="Help"
Case 10 : a$="Try Again"
Case 11 : a$="Continue"
EndSelect
ProcedureReturn a$
EndProcedure
http://www.networkmaestro.com/ManagedMessageBox.zip
**new** http://www.networkmaestro.com/ManagedMessageBox394.zip
It's a standard PB messagerequester in every way, I'm just playing a few tricks on it. So all the information in the PB docs regarding MessageRequester() are valid for this version as well. There is one small difference, though. All ManagedMessageBox's are HWND_TOPMOST. Sticky fellows.
I gratefully accepted some event-management help from srod on this one.