Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Ignore-O-Matic

by jorg (Friar)
on May 11, 2001 at 17:50 UTC ( #79710=note: print w/replies, xml ) Need Help??


in reply to Ignore-O-Matic

Cool little program beretboy !
This slightly modified version brings your DOS window back afterwards when running it from the commandline.
I know this code wasn't submitted for peer review but i couldn't resist :)
use Win32::Sound; use Win32::GUI; $MW = new Win32::GUI::Window( -title => 'Ignore-O-matic', -left => 100, -top => 100, -width => 150, -height => 175, -name => 'MainWindow', -visible => 1, ); $because = $MW->AddButton( -text => 'because!', -name => 'because', -left => 25, -top => 25, ); $quiet = $MW->AddButton( -text => 'Be Quiet!', -name => 'quiet', -left => 25, -top => 50, ); $goaway = $MW->AddButton( -text => 'Go AWAY!', -name => 'away', -left => 25, -top => 75, ); $nocare = $MW->AddButton( -text => 'I do not care!', -name => 'nocare', -left => 25, -top => 100, ); $important = $MW->AddButton( -text => 'More important!', -name => 'important', -left => 25, -top => 125, ); my ($DOS) = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($DOS); Win32::GUI::Dialog(); sub MainWindow_Terminate { $MW->PostQuitMessage(1); Win32::GUI::Show($DOS); } sub quiet_Click { Win32::Sound::Play("bequite.wav"); return 0; } sub because_Click { Win32::Sound::Play("because.wav"); return 0; } sub away_Click { Win32::Sound::Play("goaway.wav"); return 0; } sub nocare_Click { Win32::Sound::Play("nocare.wav"); return 0; } sub important_Click { Win32::Sound::Play("moreimportant.wav"); return 0; }


Jorg

"Do or do not, there is no try" -- Yoda

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2021-09-18 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?