` ------------------------------------------------------------------------- #CONSTANT DLL_User32 3 LOAD DLL "User32.dll",DLL_User32 ` -------------------------------------------------------------------------
` MsgBox() Options ------------------- #CONSTANT MsgOKOnly = 0 #CONSTANT MsgOKCancel = 1 #CONSTANT MsgAbortRetryIgnore = 2 #CONSTANT MsgYesNoCancel = 3 #CONSTANT MsgYesNo = 4 #CONSTANT MsgRetryCancel = 5 ` ------------------------------------ #CONSTANT MsgCritical = 16 #CONSTANT MsgQuestion = 32 #CONSTANT MsgExclamation = 48 #CONSTANT MsgInformation = 64 ` ------------------------------------ #CONSTANT MsgDefaultBtn1 = 0 #CONSTANT MsgDefaultBtn2 = 256 #CONSTANT MsgDefaultBtn3 = 512 ` ------------------------------------ #CONSTANT MsgApplicationModal = 0 #CONSTANT MsgSystemModal = 4096 ` MsgBox() Return Values ------------- #CONSTANT MsgOK = 1 #CONSTANT MsgCancel = 2 #CONSTANT MsgAbort = 3 #CONSTANT MsgRetry = 4 #CONSTANT MsgIgnore = 5 #CONSTANT MsgYes = 6 #CONSTANT MsgNo = 7 ` ------------------------------------ Result = MsgBox("Save Before Exiting?","Would you like to Save Changes before you Exit?",MsgYesNoCancel) If Result = MsgYes Then Print "You Pressed the YES Button" If Result = MsgNo Then Print "You Pressed the NO Button" If Result = MsgCancel Then Print "You Pressed the CANCEL Button" Do Loop
` -------------------------------------------------------------------------------------------------------------------- FUNCTION MsgBox(Title$,Msg$,Options) : ` Show a MessageBox, Returns Button Pressed hwnd = CALL DLL(DLL_USER32,"GetActiveWindow") Result = CALL DLL(DLL_USER32,"MessageBoxA",hwnd,Msg$,Title$,Options) ENDFUNCTION Result ` -------------------------------------------------------------------------------------------------------------------- |