Code archives/User Input/More API Requesters
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Stick the 'MessageBox%' declaration in user32.decls and you will have more pop up requesters. Have fun. | |||||
; More requesters By Prof ; user32.decls ; MessageBox%(hWnd,lpText$,lpCaption$,uType):"MessageBoxA" ; Style = 0 ; OK ; Style = 1 ; OK / CANCEL ; Style = 2 ; ABORT / RETRY / IGNORE ; Style = 3 ; YES / NO / CANCEL ; Style = 4 ; YES / NO ; Style = 5 ; RETRY / CANCEL ; Style = 6 ; CANCEL / TRY AGAIN / CONTINUE ; Notice the following return values no matter which Style is used..... ; ; 1 means OK clicked ; 2 means CANCEL clicked ; 3 means ABORT clicked ; 4 means RETRY clicked ; 5 means IGNORE clicked ; 6 means YES clicked ; 7 means NO clicked ; 10 means TRY AGAIN clicked ; 11 means CONTINUE clicked Graphics 640,480,32,2 SetBuffer BackBuffer() STYLE = 6 Result=MessageBox(0,"Popup message","Popup caption",Style) Text 10,10,"Result = "+Str(Result) Flip Repeat Until KeyDown(1) End |
Comments
| ||
Also, to use an Icon in the requester, add one of the following to the style:; Style = Style + $40 ; "i" in information bubble (notify beep) ; Style = Style + $30 ; "!" in yellow triangle (error beep) ; Style = Style + $20 ; "?" in information bubble (no beep) ; Style = Style + $10 ; "X" in red circle (fatal error beep) Which makes this code far more useful. :D |
| ||
very cool and useful... now i don't have to wish i had BlitzPlus anymore!! YIPEE! |
| ||
Very handy |
Code Archives Forum