Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Message Box

by oaklander (Acolyte)
on Jan 02, 2002 at 21:17 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found