Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Message Box

by oaklander (Acolyte)
on Jan 02, 2002 at 21:17 UTC ( #135719=perlquestion: print w/replies, xml ) Need Help??

oaklander has asked for the wisdom of the Perl Monks concerning the following question:

Please advise how I would get the 'Win32::MsgBox' to work.
As a test I just typed in a one line script with the following line: Win32::MsgBox("Test of box");

My error message:
Undefined subroutine &Win32::MsgBox called at C:\Perl\bin\WINY.PL line 2.

Do I need to put some type of 'use::Win32 etc...' message in the script??

Replies are listed 'Best First'.
Re: Message Box
by Moonie (Friar) on Jan 02, 2002 at 21:54 UTC
    oaklander - you do need to include use Win32; at the top of your script. The format for Win32::MsgBox is this: Win32::MsgBox(MESSAGE [, FLAGS [, TITLE]]) - check out the perldocs at Win32. - Moon

    update: an example -
    use Win32; $msg = "Test of Box"; Win32::MsgBox($msg, 0 | MB_ICONINFORMATION, 'Just an Example');
      Thanks Moonie for the answer.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://135719]
Approved by root
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2023-12-09 16:07 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (38 votes). Check out past polls.