Hiding mouse pointer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sha Crawford

    Hiding mouse pointer

    How do I hide the mouse pointer in a particular MS Access form?
    Thanks.

    Sha Crawford


  • Eric Schittlipz

    #2
    Re: Hiding mouse pointer


    "Sha Crawford" <sha_crawford@h otmail.com> wrote in message
    news:1101997698 .098645.225540@ c13g2000cwb.goo glegroups.com.. .[color=blue]
    > How do I hide the mouse pointer in a particular MS Access form?
    > Thanks.
    >
    > Sha Crawford
    > www.sha-crawford.co.uk
    >[/color]

    Hiding the cursor may be a bit annoying and unexpected for your users. Have
    you looked at opening forms modally so that you can't do anything else until
    you've shut that form? For example, you wouldn't be able to move your
    cursor to a menu or toolbar or open another form.
    If you really need to do it, paste the following into a new module. Then you
    could call HideTheCursor when the form opens and ShowTheCursor when it
    closes. You could also look at clipping the cursor, where restrict the
    mouse to a fixed rectangle using co-ordinates you supply (I have given some
    arbitrary values).


    ' *************** *************** *****
    Option Compare Database
    Option Explicit

    Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End Type

    Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
    Declare Function ShowCursor& Lib "user32" (ByVal bShow As Long)

    Public Sub ClipTheCursor()

    Dim rec As RECT
    Dim lng As Long

    With rec
    .Top = 100
    .Left = 100
    .Bottom = 400
    .Right = 400
    End With

    lng = ClipCursor(rec)

    End Sub

    Public Sub UnclipTheCursor ()

    Dim lng As Long

    lng = ClipCursor(ByVa l 0&)

    End Sub

    Public Sub HideTheCursor()
    Call ShowCursor(0)
    End Sub

    Public Sub ShowTheCursor()
    Call ShowCursor(-1)
    End Sub
    ' *************** *************** *****




    Comment

    • PC Datasheet

      #3
      Re: Hiding mouse pointer

      You could add an unbound textbox with 0 width and set the focus to that
      textbox.

      --
      PC Datasheet
      Your Resource For Help With Access, Excel And Word Applications
      resource@pcdata sheet.com



      "Sha Crawford" <sha_crawford@h otmail.com> wrote in message
      news:1101997698 .098645.225540@ c13g2000cwb.goo glegroups.com.. .[color=blue]
      > How do I hide the mouse pointer in a particular MS Access form?
      > Thanks.
      >
      > Sha Crawford
      > www.sha-crawford.co.uk
      >[/color]


      Comment

      Working...