almaler has asked for the wisdom of the Perl Monks concerning the following question:

Hello Experts, I am trying to run a script and am receiving this error: "Win32::GUI: the -style option is deprecated". The script does contain the following contents, but I am not familiar with perl scripting at all and do not know if I need to change that line or remove it completely. Could someone point me in the right direction?

my $Window = new Win32::GUI::DialogBox( -title => "Top Secret", -left => 200, -top => 200, -width => 400, -height => 245, -name => "Window", -style => WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU, );

Replies are listed 'Best First'.
Re: Win32::GUI: the -style option is deprecated
by GrandFather (Saint) on Sep 19, 2007 at 22:29 UTC

    The documentation for the -style common option says:

    Sets the style for the window. Use of this option is deprecated. Use -pushstyle or -popstyle (or one of their alternatives) instead.

    See Win32::GUI::Reference::Options.


    Perl is environmentally friendly - it saves trees
Re: Win32::GUI: the -style option is deprecated
by almut (Canon) on Sep 19, 2007 at 22:20 UTC

    You could try -addstyle instead, but also see this thread (for the subtle differences).

Re: Win32::GUI: the -style option is deprecated
by state-o-dis-array (Hermit) on Sep 19, 2007 at 22:20 UTC
    There's a tutorial that you might find helpful on the Win32::GUI page at CPAN.