DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Hide mouse pointer

  1. #1
    Carl Guest

    Hide mouse pointer


    Hi,

    I want to be able to hide the mouse pointer in parts of a VB 6 application
    that only use keyboard input. VB's help seems remarkably unhelpful. I've
    tried setting the mouse pointer to a blank icon but I'm left with a black
    square that the user can drag over the screen's text. This should be such
    a simple thing, but I've spent ages trying to find how-to instructions on
    the web.

    Can anyone give me instructions or point me in the direction of somewhere
    they can be found?

    many thanks in advance,
    Carl

  2. #2
    Anthony Verna Guest

    Re: Hide mouse pointer


    There is an API called ShowCursor:

    Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As
    Long

    That's it.

    -Anthony



    "Carl" <bart.simpson@actrix.gen.nz> wrote:
    >
    >Hi,
    >
    >I want to be able to hide the mouse pointer in parts of a VB 6 application
    >that only use keyboard input. VB's help seems remarkably unhelpful. I've
    >tried setting the mouse pointer to a blank icon but I'm left with a black
    >square that the user can drag over the screen's text. This should be such
    >a simple thing, but I've spent ages trying to find how-to instructions on
    >the web.
    >
    >Can anyone give me instructions or point me in the direction of somewhere
    >they can be found?
    >
    >many thanks in advance,
    >Carl



  3. #3
    John K. Guest

    Re: Hide mouse pointer

    call Showcursor(sw_hide)

    You'll find the sw_hide constant in the API viewer

    "Anthony Verna" <averna@strohlsystems.com> wrote in message
    news:391fe9a7$1@news.devx.com...
    >
    > There is an API called ShowCursor:
    >
    > Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As
    > Long
    >
    > That's it.
    >
    > -Anthony
    >
    >
    >
    > "Carl" <bart.simpson@actrix.gen.nz> wrote:
    > >
    > >Hi,
    > >
    > >I want to be able to hide the mouse pointer in parts of a VB 6

    application
    > >that only use keyboard input. VB's help seems remarkably unhelpful. I've
    > >tried setting the mouse pointer to a blank icon but I'm left with a black
    > >square that the user can drag over the screen's text. This should be such
    > >a simple thing, but I've spent ages trying to find how-to instructions on
    > >the web.
    > >
    > >Can anyone give me instructions or point me in the direction of somewhere
    > >they can be found?
    > >
    > >many thanks in advance,
    > >Carl

    >




  4. #4
    Anthony Verna Guest

    Re: Hide mouse pointer


    Really? I would just pass it "True" and "False" constants. That worked well.
    . .

    "John K." <john.k@home.se> wrote:
    >call Showcursor(sw_hide)
    >
    >You'll find the sw_hide constant in the API viewer



  5. #5
    Douglas Guest

    Re: Hide mouse pointer

    You would have to use a transparent icon, but even sow, the user would still
    be able to click in the region.

    I forget the name of the function, but I am sure there is one to stop the
    mouse enering an area....something like set CursorRect

    hth,
    Doug

    Carl <bart.simpson@actrix.gen.nz> wrote in message
    news:391f9bfc$1@news.devx.com...
    >
    > Hi,
    >
    > I want to be able to hide the mouse pointer in parts of a VB 6 application
    > that only use keyboard input. VB's help seems remarkably unhelpful. I've
    > tried setting the mouse pointer to a blank icon but I'm left with a black
    > square that the user can drag over the screen's text. This should be such
    > a simple thing, but I've spent ages trying to find how-to instructions on
    > the web.
    >
    > Can anyone give me instructions or point me in the direction of somewhere
    > they can be found?
    >
    > many thanks in advance,
    > Carl




  6. #6
    Carl Guest

    Re: Hide mouse pointer


    >Really? I would just pass it "True" and "False" constants. That worked

    well.

    It does indeed. Thanks very much for your help, I was hoping there'd be a
    simple solution. Thanks also John & Douglas.

    Quite a bit of the discussion on VB Sites & newsgroups seems to be about
    API function calls. I worked out how to use the API viewer, but it doesn't
    seem to give any info on what the functions do or how to use them. Does VB
    have this information in it's help system somewhere, or do people find it
    out by reading the microsoft website?

    thanks again for your help,
    Carl

  7. #7
    Karl E. Peterson Guest

    Re: Hide mouse pointer

    Hi Carl --

    > Quite a bit of the discussion on VB Sites & newsgroups seems to be about
    > API function calls. I worked out how to use the API viewer, but it doesn't
    > seem to give any info on what the functions do or how to use them. Does VB
    > have this information in it's help system somewhere, or do people find it
    > out by reading the microsoft website?


    Both. It's in the MSDN that ships with Visual Studio, as well as on the web. If you
    don't have a local copy, hit http://search.microsoft.com/us/dev/default.asp and enter
    the name of the API you're curious about.

    Later... Karl




  8. #8
    Carl Guest

    Re: Hide mouse pointer


    >Both. It's in the MSDN that ships with Visual Studio, as well as on the

    web. If you
    >don't have a local copy, hit http://search.microsoft.com/us/dev/default.asp

    and enter
    >the name of the API you're curious about.
    >
    >Later... Karl


    thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center