Hi there ....


I have some problems with this sub:

sub Window_Terminate {
                $message = Win32::MsgBox("Do you want to quit?", 4 |
MB_ICONQUESTION, "Quit?");
                if($message = '6') {
                        $message = Win32::MsgBox("Do you want to save?", 4 |
MB_ICONQUESTION, "Save?");
                        if($message = '6') {
                        &FileSave_Click;
                                $message = Win32::MsgBox("$version Copyright (c) 
2000\n by Jens
Luedicke \<jens\@irs-net.com\>",
                                MB_ICONEXCLAMATION, "YATE");
                        return -1;
                        } else {
                                $message = Win32::MsgBox("$version Copyright (c) 
2000\n by Jens
Luedicke \<jens\@irs-net.com\>",                                 MB_ICONEXCLAMATION, 
"YATE");
                        return -1;
                        }
                } else {
                        return 1;
                }
}

When the user want's to exit he will be asked to confirm. When he
confirms to
exit, he will be asked to save. But when I click "No" the window to
save the file
will be opened anyway.... Why?


> The options for Flags are:

>         0 = OK
>         1 = OK and Cancel
>         2 = Abort, Retry, and Ignore
>         3 = Yes, No and Cancel
>         4 = Yes and No
>         5 = Retry and Cancel

>         MB_ICONSTOP          "X" in a red circle
>         MB_ICONQUESTION      question mark in a bubble
>         MB_ICONEXCLAMATION   exclamation mark in a yellow triangle
>         MB_ICONINFORMATION   "i" in a bubble

> So, for a yes/no box with an info icon you'd use:
> $message = Win32::MsgBox("Press either yes or no", 4 |
> MB_ICONINFORMATION, "Error");

> Then you check the $message variable for the return code.

> The function returns the menu id of the selected push button:

>         0  Error

>         1  OK
>         2  Cancel
>         3  Abort
>         4  Retry
>         5  Ignore
>         6  Yes
>         7  No
with friendly regards....

          Jens Luedicke <[EMAIL PROTECTED]>

//PGP Public Keys: [EMAIL PROTECTED] <autoresponder>


Reply via email to