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

Hi,

Is it possible for a Perl/Tk (or Win32::GUI) application to disable the mousecursor? I want it to disappear while pVoice is running. Any suggestions?

Jouke Visser, Perl 'Adept'

Replies are listed 'Best First'.
Re: Disabling the mousecursor
by japhy (Canon) on May 08, 2001 at 19:07 UTC
    I'm able to disable my mouse cursor by having my bloody machine lock up. ;)

    japhy -- Perl and Regex Hacker
Re: Disabling the mousecursor
by busunsl (Vicar) on May 09, 2001 at 12:19 UTC
    You could provide your own cursor and make it one pixel wide.

    Excerpt from the perl Tk FAQ:

    $mw->configure(-cursor => ['@' . Tk->findINC('demos/images/cursor.xbm'), Tk->findINC('demos/images/cursor.mask'), 'red', 'green']);
Re: Disabling the mousecursor
by Sinister (Friar) on May 08, 2001 at 20:17 UTC
    I think you wish to prevent a second click while pVoice is already being a voice right?
    How about you iconify while being a voice, and un_iconify when that state ends? Cause I cant seem to find any tricks on the pointer (for X that is)
    Within Win32, it should be very possible...

    It is a dirty trick... I know!

    Sinister greetings.
      I think you wish to prevent a second click while pVoice is already being a voice right?


      ehh...wrong...When you start X (or windows, whatever), the mousecursor is positioned in the middle of your screen. When I automatically start my application (indeed pVoice), that cursor is positioned on an icon that shouldn't be selected when the mousebutton is pressed (the application only responds to mouseclicks on the mainwindow, and should not respond to clicks on one of the buttons). So by hiding the mousecursor that problem would be solved...

      Jouke Visser, Perl 'Adept'
Re: Disabling the mousecursor
by Caillte (Friar) on May 09, 2001 at 12:49 UTC

    Going through the MSDN Library (A painful task in itself ;)) The only thing I could find was for windoze ME. With ME's accessability functions you can set the visibility of the mouse. This, apparently, is new to ME.

    Not much help really :P

    $japh->{'Caillte'} = $me;