http://www.perlmonks.org?node_id=934043


in reply to Win32::GUI Notify Icon

Try calling Change() as a method, rather than a function, since the Win32::GUI::NotifyIcon package has its own Change() method, which is different to the one in the Win32::GUI package, eg.

$ni->Change( -icon => $tebIcon );

Replies are listed 'Best First'.
Re^2: Win32::GUI Notify Icon
by hennesse (Beadle) on Oct 27, 2011 at 02:27 UTC

    kejohm,

    Wow - that worked fine. It also worked for changing -tip

    I guess the final piece is to add a timer to query the status of the service periodically and update the icon (and tooltip) accordingly. I'll work on that.

    Win32::GUI is an incredibly powerful tool. The documentation is pretty sparse, so it's really confusing for someone (like me) who's never done any GUI programming.

    Thanks for your help! -Dave

      Maybe take a look at the win32-gui-demos.pl script which comes with Win32::GUI. It's a handy little program that allows you to view the sample scripts that also come with Win32::GUI. You can view the source of the scripts (including itself) as well as run them. These scripts should provide some good examples for using Win32::GUI and should help you on your way.

      Yes, the documentation is a bit sparse. If you know what you are looking for, you can usually find information in the Microsoft MSDN Documentation Library, but that requires knowledge of the underlying Windows functions that Win32::GUI uses. Check out the source for Win32::GUI if you are keen.

      And if you are still stuck, you can always ask for help on PerlMonks :)

        Do you remember Cray super-computers?
        Do you remember when Cray offered UniCOS in addition to COS?

        Sorry, I'm an ancient Unix geek. While you can teach old dogs (me) new tricks (Win32),
        they're really slow learners.

        Expect more dumb questions...

        Thanks for your help! - Dave