I ran your code. First, it complained about the extra right curly bracket in this sub:

sub PresentWindow{
        $main->Resize(GetClientSize()) || ErrMsg("Could not resize
Window!\n");
        $main->Show() || ErrMsg( "Could not un-hide window!\n");
        }
        $main->Dialog() || ErrMsg("Could not start dialog!\n");
}

When I fixed that and tried again, Windows gave me a 'This application has performed an illegal operation and will be shut down. A little digging showed that the problem as this line, which does not have a -name option set.

my $label = $main->AddLabel(-text => "This is my text.", -font => $font);

Adding a name label fixes that, and the I get the error message that it can't unhide - but I also see the window! (See Paul's message about Show() returning 0.)

My guess is that you're using a different version of Win32::GUI than I am (I'm still using 0.0.558 because I couldn't get the PPM for 0.0.665 at SourceForge to work) and your version is slightly more tolerant of missing names. Anyway, it seems like what's happening is that your window actually appears, but is 0 pixels by 0 pixels in dimension.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


Reply via email to