I'm unsure which buttons you want to appear on the message box, but
making a guess from the text, this would display a message box with Ok
and Cancel buttons and $result would contain a 1 if the Ok button was
clicked and a 2 if the Cancel button was clicked -
$result = Win32::MsgBox("Please fill in account name", 1|MB_ICONSTOP,
"Error");
Check out the Win32 section of the Perl documentation for the other
options for the message box.
Darin
--------------------------------------------
Darin Cruickshanks
Labs Manager, Computing Service
University of Essex
[EMAIL PROTECTED]
01206 873585
-----Original Message-----
From: Steffen Mueller [mailto:[EMAIL PROTECTED]
Sent: 01 May 2003 19:50
To: [email protected]
Subject: [perl-win32-gui-users] Messagebox
It seems that the MessageBox function doesn't return any value.
my $return = Win32::GUI::MessageBox (
0,
'please fill in account name',
'error',
2
);
print $return; # prints nothing
Does anyone have a piece of code which displays a MessageBox with
Win32::API (and prints which button the user clicked)?
Thanks,
SteMue
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users