Results 1 to 3 of 3

Thread: MousePointer "Variable Not Defined"

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2004
    Posts
    79

    MousePointer "Variable Not Defined"

    I have already used mousepointer in my software with no problems. Now, when I use it in a module, I'm getting a compile error "Variable Not Defined". My exact statement is "mousepointer = vbHourglass". Thoughts anyone? Thanks!

    So sorry everyone...I thought I was on the Classic VB forum. Please excuse!

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    VBA.... no hourglass
    MousePointer Property


    Specifies the type of pointer displayed when the user positions the mouse over a particular object.

    Syntax

    object.MousePointer [=MousePointer]

    The MousePointer property syntax has these parts:

    Part Description
    object Required. A valid object.
    MousePointer Optional. The shape you want for the mouse pointer.


    Settings

    The settings for MousePointer are:

    Value Description
    0 Standard pointer. The image is determined by the object (default).
    1 Arrow.
    2 Cross-hair pointer.
    3 I-beam.
    6 Double arrow pointing northeast and southwest.
    7 Double arrow pointing north and south.
    8 Double arrow pointing northwest and southeast.
    9 Double arrow pointing west and east.
    10 Up arrow.
    11 Hourglass.
    12 "Not" symbol (circle with a diagonal line) on top of the object being dragged. Indicates an invalid drop target.
    13 Arrow with an hourglass.
    14 Arrow with a question mark.
    15 Size all cursor (arrows pointing north, south, east, and west).
    99 Uses the icon specified by the MouseIcon property.


    Remarks

    Use the MousePointer property when you want to indicate changes in functionality as the mouse pointer passes over controls on a form. For example, the hourglass setting (11) is useful to indicate that the user must wait for a process or operation to finish.

    Some icons vary depending on system settings, such as the icons associated with desktop themes.
    In access:
    Code:
    docmd.hourglass true|false

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    VBA...Yes hourgalss (Busy equilivalent). In any module or class
    you can do a ...

    VB Code:
    1. Screen.MousePointer = 11
    From Access VBA Help -

    MousePointer Property

    You can use the MousePointer property together with the Screen
    object to specify or determine the type of mouse pointer currently
    displayed. Read/write Integer.

    expression.MousePointer
    expression Required. An expression that returns one of
    the objects in the Applies To list.

    Remarks
    The setting for the MousePointer property is an Integer value
    representing one of the following pointers.

    Setting Description
    0 (Default) The shape is determined by Microsoft Access
    1 Normal Select (Arrow)
    3 Text Select (I-Beam)
    7 Vertical Resize (Size N, S)
    9 Horizontal Resize (Size E, W)
    11 Busy (Hourglass)


    Note Setting the MousePointer property to an integer other than
    one that appears in the preceding table will cause the property
    to be set to 0.

    You can set the MousePointer property only by using Visual Basic.

    The MousePointer property affects the appearance of the mouse
    pointer over the entire screen. Some custom controls have a
    MousePointer property that, if set, will specify how the mouse
    pointer is displayed when it's positioned over the control.

    You could use the MousePointer property to indicate that your
    application is busy by setting the property to 11 to display an
    hourglass icon. You can also read the MousePointer property to
    determine what's being displayed. This could be useful if you
    wanted to prevent a user from clicking a command button while
    the mouse pointer is displaying an hourglass icon.

    Setting the MousePointer property to 11 is the same as passing
    the True (–1) argument to the Hourglass method of the DoCmd
    object. Conversely, passing the True argument to the Hourglass
    method also sets the MousePointer property to 11.




    VB/Outlook Guru!
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width