Changing mouse cursor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    Changing mouse cursor

    Hi there,

    Is there any way I can change mouse cursor in ms access form using code.

    If i get get some code which will change mouse cursor with some text that will be great.

    Thanks,
    Yogesh
  • dima69
    Recognized Expert New Member
    • Sep 2006
    • 181

    #2
    Originally posted by ykhamitkar
    Hi there,

    Is there any way I can change mouse cursor in ms access form using code.

    If i get get some code which will change mouse cursor with some text that will be great.

    Thanks,
    Yogesh
    The simple way to change mouse pointer in Access is to make it a hourglass:
    Code:
    docmd.Hourglass True/False

    Comment

    • ykhamitkar
      New Member
      • May 2007
      • 64

      #3
      Originally posted by dima69
      The simple way to change mouse pointer in Access is to make it a hourglass:
      Code:
      docmd.Hourglass True/False

      Great

      Thank you so much

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Originally posted by ykhamitkar
        Hi there,

        Is there any way I can change mouse cursor in ms access form using code.

        If i get get some code which will change mouse cursor with some text that will be great.

        Thanks,
        Yogesh
        You can use Screen.MousePoi nter property. The following code changes mouse cursor to I-beam shape.

        [CODE=vb]
        Screen.MousePoi nter = 3
        [/CODE]

        Read Access help topic named MousePointer property.

        Comment

        • mattkorguk
          New Member
          • Mar 2007
          • 28

          #5
          Hi,
          That's very helpful for me also, I have noticed though that there doesn't seem to be an option for the little hand/ finger?!
          I'd like to be able to set the onmouse over property to display the hand, any suggestions?
          I realise this is an automatic thing for hyperlinks, but I'd like it to appear on buttons/ labels too.

          Thanks

          Comment

          • mattkorguk
            New Member
            • Mar 2007
            • 28

            #6
            It's OK, found it!

            15 = Hand

            :)

            Comment

            • mattkorguk
              New Member
              • Mar 2007
              • 28

              #7
              There would appear NOT to be a on mouse over property for button and labels...back to the drawing board then.

              Comment

              • missinglinq
                Recognized Expert Specialist
                • Nov 2006
                • 3533

                #8
                In Access it's not called Mouse Over it's called Mouse Move!

                Comment

                • mattkorguk
                  New Member
                  • Mar 2007
                  • 28

                  #9
                  cough cough, oh yeah, thanks.

                  Comment

                  • missinglinq
                    Recognized Expert Specialist
                    • Nov 2006
                    • 3533

                    #10
                    BTW, Screen.MousePoi nter = 15 does not change the cursor to a hand! The valid arguments are as follows:

                    Screen.MousePoi nter = 1 'Standard Cursor
                    Screen.MousePoi nter = 3 ' I Beam
                    Screen.MousePoi nter = 7 'Double Arrow Vertical
                    Screen.MousePoi nter = 9 'Double Arrow Horizontal
                    Screen.MousePoi nter = 11 'Hour Glass

                    The attached file contains a function that will change the pointer when the cursor hovers over a control. One of the pointers included is the hand with the Fickle Finger of Fate!
                    Attached Files

                    Comment

                    • mattkorguk
                      New Member
                      • Mar 2007
                      • 28

                      #11
                      Thanks for that I just noticed that 15 did nothing. I wonder why the options are so limited?!
                      The hand is displayed when you have a hyperlink on the page! Grrr

                      Comment

                      • mattkorguk
                        New Member
                        • Mar 2007
                        • 28

                        #12
                        I've got it, if you just put a space into the Hyperlink address the hand is displayed! ;-)

                        Comment

                        • Dominiqued3f4g5
                          New Member
                          • Jul 2007
                          • 1

                          #13
                          Thanks it's working fine.

                          Dom

                          Comment

                          • bluray
                            New Member
                            • Jun 2007
                            • 14

                            #14
                            oh nice find on the space in the hyperlink address option! now all of my pretty image buttons act somewhat like a real button :) now if only i could figure out how to get access to allow seperate images to display during mouse move and down to give it that much more of a real button feel.

                            Comment

                            • topher23
                              Recognized Expert New Member
                              • Oct 2008
                              • 234

                              #15
                              It's been a few years, but for anyone stumbling upon this post: Don't forget to set
                              Code:
                              Screen.MousePointer = 0 'Access default
                              after you're done with whatever required the explicit pointer. So if you have Access change the pointer in an image's MouseOver event in the Detail section, put the code for returning to default in the Detail section's MouseOver event.

                              Also, relating to bluray's comment, if buttons in the 2007+ versions of Access are still too vanilla for you, you can create web-like MouseOver effects using a transparent command button placed over 3 stacked images. Have the "Default" image change to visible in the Detail OnMouseMove event, the "Hover" change to visible in the command button's OnMouseMove event, and the "Selected" change to visible in the button's OnMouseDown event (all while setting each of the respective other two images back to Visible = False). You get a really spectacular result for something many consider "impossible " in Access.
                              Last edited by topher23; Mar 5 '14, 03:53 PM. Reason: spelling

                              Comment

                              Working...