I am having a problem with a dialog box. The main problem is, it won't show up. Below is the code I am using to open a new window from my main window when a button is pushed ( store ) . Before this code is all of my normal application code ( which works fine ). I have tried it with and without the first and second Win32::GUI::Dialog(); entries. Neither will make the new window appear. Can someone please tell me what I am doing wrong?
<MainWindow GUI code is here > $MainWindow->Show(); Win32::GUI::Dialog(); <subs for main window are here> sub stored_Click { $Win=Win32::GUI::DialogBox->new( # -left => 341, # -top => 218, -width => 563, -height => 368, -name => "Win", -title => "Window Title" ); $Win->Show(); $Win->AddRichEdit( -text => "", -name => "RichEdit_1", -left => 1, -top => 1, -width => 552, -height => 306, ); $Win->AddButton( -text => "Save", -name => "instrsave", -left => 132, -top => 316, -width => 90, -height => 21, -foreground => 0, ); $Win->AddButton( -text => "Cancel", -name => "popupcancel", -left => 343, -top => 315, -width => 95, -height => 21, -foreground => 0, ); } Win32::GUI::Dialog(); sub Window_Terminate { return -1; } sub Close_Click { Window_Terminate(); };