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

<html> <body>

There I was hapilly sitting on my RedHat 7 box programming away in perl when it beckoned me. "Put perl on me!" it said. "You can use my 600Mhz processor and my 160Megs of RAM. My 17" LG monitor wants code. You know you want to" it added, tempting me.
So I did it, I put perl on my Windows box/gateway. I played, I had fun. I frolicked without fork(). I re-arranged the registry. I wised up on Win32::GUI and it didn't work. Thats right, it didn't work.

I don't know why but whenever I try to run a Win32::GUI perl app I get either a BSOD or a "This program has performed an illegal operation...."
Now I come to you, perlmonks, with my problem. What do I do? Is there a patch (apart from formatting and installing linux)? I even tried using the perl2exe program from IndigoStar Software and compiled my programs. Nothing changed. By the way I'm using IndigoPerl.

Thanks in advance for any help :)
The Evil but Fickle Dr Lambado

</body> </html>

Replies are listed 'Best First'.
(bbfu) (Tk) Re: Windows Me + Win32::GUI blues...
by bbfu (Curate) on Aug 12, 2001 at 19:22 UTC

    Well, I don't have any ideas on how to fix Win32::GUI but I might have a work-around. Have you thought about using Tk instead? Most likely, it won't do all of the stuff that Win32::GUI could do (if it worked) (although it might do some stuff that Win32::GUI couldn't), and some of the interactions might not be exactly the same as plain, native widgets. It does work well for simple GUI interfaces and widget differences are relatively few and somewhat subtle, so they shouldn't cause much of a problem.

    I've used Tk to good effect when I couldn't get Win32::GUI to work. HTH.

    bbfu
    Seasons don't fear The Reaper.
    Nor do the wind, the sun, and the rain.
    We can be like they are.

      <html> <body>

      Good idea! But doesn't it require extra libraries? That is my problem, I looking into developing software for my friends that don't have tk and don't really want to download it either. They also probably want a familiar Windows look and feel (although the crashes are a little too familiar:)). If tk requires no extra libraries then I would be more than happy to learn and use it.

      The Evil but Fickle Dr Lambado

      </body> </html>
        If you don't want your friends to have to download libraries, You could use the ActiveState's PerlApp program to build standalone .exe files

        It is not free but there is no limit on the number of 30 day demo periods you can get.

        Not to my knowledge it doesn't. I use the ActiveState distribution of Perl, and I didn't have to do anything but use the ppm to install the module from the ActiveState repository.

        Since you use the IndigoStar distro, you could still download the distro as a .zip file from ActiveState, unzip it to a temporary directory, and then use the dpm program that comes with IndigoStar to install it.

        TStanley
        --------
        There's an infinite number of monkeys outside who want to talk to us
        about this script for Hamlet they've worked out
        -- Douglas Adams/Hitchhiker's Guide to the Galaxy
Re: Windows Me + Win32::GUI blues... (boo)
by boo_radley (Parson) on Aug 13, 2001 at 01:48 UTC
    If you have problems with win32::gui, you may also be interested in wxPerl -- I've had better success with wx than with win32::gui, and the wxPerl library can be used not only with windows systems, but with assorted... um... unix thingies as well. Supposedly.
Re: Windows Me + Win32::GUI blues...
by jplindstrom (Monsignor) on Aug 13, 2001 at 15:22 UTC
    First, make sure you have Win32::GUI version 0.0.558 installed.

    Second, check if this script bombs (it shouldn't):

    #!/usr/local/bin/perl -w use strict; use Win32::GUI; my $winMain = new Win32::GUI::Window( -left => 13, -top => 32, -width => 439, -height => 260, -name => "winMain", -text => "Autoscroller" ); my $btnTest = $winMain->AddButton( -text => "btnTest", -name => "btnTest", -left => 0, -top => 0, -width => 60, -height => 20, ); $winMain->Show(); Win32::GUI::Dialog();

    Your error sounds exactly like the well-known "no -name option" problem, which is present in some of the examples in the Win32::GUI tutorial :/

    All windows and controls need a -name.

    /J

      <html> <body>

      Well that worked! But my other trys do not, as doesn't the Slashdot Headline Grabber (found here) and the monkchat program (also found here). How do I fix these scripts? Thanks a lot for the help so far :).

      The Evil But Fickle Dr Lambado

      </body> </html>