' MSGBOX Demo — various styles via MessageBoxA DECLARE
#COMPILE EXE
#DIM ALL

DECLARE FUNCTION MessageBox LIB "USER32.DLL" ALIAS "MessageBoxA" (BYVAL hWnd AS LONG, BYVAL lpText AS ASCIIZ, BYVAL lpCaption AS ASCIIZ, BYVAL uType AS LONG) AS LONG

CONST MB_ICONINFORMATION = 64
CONST MB_YESNO = 4
CONST MB_ICONQUESTION = 32
CONST MB_ICONERROR = 16
FUNCTION PBMAIN() AS LONG
    PRINT CHR$(7);
    MessageBox(0, "This is an information message" + CHR$(0), "Info" + CHR$(0), MB_ICONINFORMATION)
    MessageBox(0, "Are you sure?" + CHR$(0), "Confirm" + CHR$(0), 36)
    MessageBox(0, "Critical error!" + CHR$(0), "Error" + CHR$(0), MB_ICONERROR)
    FUNCTION = 0
END FUNCTION
