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); } 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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ignore-O-Matic
by BrotherAde (Pilgrim) on May 07, 2001 at 13:11 UTC | |
|
Re: Ignore-O-Matic
by jorg (Friar) on May 11, 2001 at 17:50 UTC | |
|
Re: Ignore-O-Matic
by elwarren (Priest) on May 10, 2001 at 01:52 UTC | |
|
Re: Ignore-O-Matic
by mexnix (Pilgrim) on May 11, 2001 at 00:08 UTC | |
|
Re: Ignore-O-Matic
by beretboy (Chaplain) on Jul 13, 2001 at 17:03 UTC |