DEFLNG A-Z REM $INCLUDE: 'MessBox.Con' ' This declare is so that the PDS IDE doesn't bark too loud :-) REM $IGNORE:1 DECLARE FUNCTION MBox& ALIAS "MessageBoxA" (BYVAL Handle AS LONG, BYVAL Message AS LONG, BYVAL Heading AS LONG, BYVAL Style AS LONG) ' This declare is the one actually used. REM $Process: DECLARE FUNCTION MBox Lib "User32" StdCall ALIAS "MessageBoxA" (BYVAL Handle AS LONG, BYVAL Message AS string, BYVAL Heading AS string, BYVAL Style AS LONG) AS LONG DIM m$, h$, R, Handle, Style Handle = 0 m$ = "Hello, World!" h$ = "From a Compiled Basic Program" Style = MbAbortRetryIgnore OR MbIconExclamation ' As of Beta 002, the code generater does know that ' Stdcall does the args backward ' So, Now you MUST list them in the correct order :-) R = MBox(Handle, m$, h$, Style) ' this is the correct order ' this form also works: ' R = MBox(Handle, "Hello, World!", "From a Compiled Basic Program", Style) ' this is the correct order PRINT "Return Value: " + HEX$(R) END