Sorry if this appears twice - I posted it yesterday and got a delivery
warning. Since it hasn't showed up yet and other postings seem to get thru,
I try again:
-------------------
Basically, what you want is
Win32::GUI::SetCursor ()
the tricky thing is to get the standard resource of the hourglass. Feel free
to use my perl module http://www.fairymails.com/perl/WinStRes.pm for exactly
this:
Win32::GUI::SetCursor (WinCursor (WAIT)); # hourglass ...
Win32::GUI::SetCursor (WinCursor ()); # ... and back
What this module does is
$LoadImage = new Win32::API ('user32', 'LoadImage', [N,N,I,I,I,I],
N)
or die 'can\'t find LoadImage function';
...
%cursors =
(
'NORMAL' => 32512,
'IBEAM' => 32513,
'WAIT' => 32514,
...
sub WinCursor
{
local $_ = $cursors{$_[0]} or $cursors{'NORMAL'};
return $LoadImage->Call (0, $_, 2, 0, 0, 0x8040);
}
Have fun,
Harald
> -----Original Message-----
> From: Felix Gaehler [mailto:[EMAIL PROTECTED]
> Sent: Mittwoch, 4. Juli 2001 13:18
> To: [email protected]
> Subject: [perl-win32-gui-users] Change cursor to "hourglass" and back?
>
>
> Hi
> I have a Win32-GUI application in which a query to a website is
> executed and the results are displayed afterwards. This can take
> several seconds.
>
> To signal to the user that his query is being processed and he should
> wait, I would like to display the mouse cursor in the form of an
> hourglass while the query is processed, and turn it back to the
> original arrow form afterwards.
>
> Who can help me with this?
>
> Best Regards,
> Felix Gaehler
>
>
>
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> [email protected]
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>