Hogue, Jon wrote:
> I want to code a yes-no window when my program incurrs
> an error... But I can't figure out how that's supposed
> to happen.
>
> I can get the second window to appear that has a yes/no
> button... but as far as I can figure, you have to exit
> the submit_click subroutine before being able to take yes
> or no clicks.
> Here is some pseudo code the demonstrates what I want to do...
> Is it possible?

you're looking for a Win32::GUI::MessageBox.

    sub Submit_Click {
        # Do some stuff here

        # Do some fancy stuff...
        # Ooops, an error, ask a yes no question.

        $answer = Win32::GUI::MessageBox(
            $question_text,
            "ERROR",
            MB_ICONQUESTION | MB_YESNO,
        );
        if($answer == 6) {
            # yes
        } else {
            # no
        }
    }
        
cheers,
Aldo




Reply via email to