Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 17,037 times

Related Categories

Hide the cursor

If, for some reason, you want to hide the mouse cursor (and I can't imagine why!), you can simply call the ShowCursor API call. To hide the cursor, call pHideCursor. To show the cursor, call pShowCursor. Don't forget to call pShowCursor when your program ends!

Option Explicit
Private Declare Function ShowCursor Lib "user32" (ByVal lShow As Long) As Long

Public Sub pHideCursor()
    ShowCursor False
End Sub

Public Sub pShowCursor()
    ShowCursor True
End Sub

James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.

Comments

  • Re: [270] Hide the cursor

    Posted by jjustus on 09 Jun 2008

    I got it to work fine, but it's one of those types of functions that need to be handled with trepidation as it can really screw you up if you aren't careful.

  • Re: [270] Hide the cursor

    Posted by watup on 07 Aug 2007

    it was buggy.... first the cursor wouldnt leave, then it wouldnt come back....

  • Because of...

    Posted by GeoffSKI on 24 Oct 2003

    Touch screen applications :)