Howdy, I thought I could use fork with Win32-GUI and wait for a message it seems to have various problems unless I am doing something wrong. If fork is before show window,then window wont initailise untill forked sub exits. if launched form a event (activate button in this case) then other buttons dont work untill the forked sub returns.
Also the _LostFocus event does not work with buttons, even though the docs say it can. do nothing script follows for your general entertainment. JohnR -------------------- #!perl use Win32::GUI; $Win1 = new Win32::GUI::Window( -title => "Test Window", -name => "Win1", -left => 100, -top => 100, -width => 500, -height => 250, ); $Win1->AddLabel(-name => "l1", -width =>$Win1->ScaleWidth, -height => $Win1->ScaleHeight, -sunken=>l,); $Status = $Win1->AddStatusBar(-name => "Status",); $Win1->AddLabel(-name=> "ipdroplbl", -text=> "This is a Test Window", -left=>150, -top=> 10,); $Win1->AddButton(-name=>"quit",-left=>150, -top=>160, -width=>100, -text=>"QUIT", -cancel => 1, -default => 0, -tabstop=>0,); $Win1->AddButton(-name=>"hello",-left=>10, -top=>160, -width=>100, -text=>"HELLO", -cancel => 1, -default => 1, -tabstop=>1, ); $Win1->AddButton(-name=>"other",-left=>260, -top=>160, -width=>100, -text=>"OTHER", -cancel => 1, -default => 0, -tabstop=>0,); $Win1->AddButton(-name=>"activate",-left=>10, -top=>10, -width=>100, -text=>"ACTIVATE", -cancel => 1, -default => 0, -tabstop=>0,); #fork and &mouseoverhello; $Win1->Show; Win32::GUI::Dialog(); exit(0); sub quit_Click {return -1; } sub Win1_Terminate {return -1; } sub Win1_Shutdown{ print "Windows Shutting Down\n"; print "press enter to carry on"; my $wait=<>; } sub [EMAIL PROTECTED]>hello->GetMessage(0,0); $Win1->Status->Text("Mouse over hello button"); print "mouse over hello button\n"; return 0; } sub other_Click{ $Win1->Status->Text("other clicked"); } sub activate_Click{ $Win1->Status->Text("Activate clicked"); &mouseoverhello; } sub hello_LostFocus { $Win1->Status->Text("Hello button lost focus"); print "lost focus\n"; } sub hello_GotFocus{ print "got focus\n"; } ---------------------------end You cant sue us.