473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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
Jun 13 '07 #1
16 97443
dima69
181 Expert 100+
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:
Expand|Select|Wrap|Line Numbers
  1. docmd.Hourglass True/False
Jun 13 '07 #2
The simple way to change mouse pointer in Access is to make it a hourglass:
Expand|Select|Wrap|Line Numbers
  1. docmd.Hourglass True/False

Great

Thank you so much
Jun 13 '07 #3
FishVal
2,653 Expert 2GB
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.MousePointer property. The following code changes mouse cursor to I-beam shape.

Expand|Select|Wrap|Line Numbers
  1. Screen.MousePointer = 3
  2.  
Read Access help topic named MousePointer property.
Jun 13 '07 #4
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
Jun 26 '07 #5
It's OK, found it!

15 = Hand

:)
Jun 26 '07 #6
There would appear NOT to be a on mouse over property for button and labels...back to the drawing board then.
Jun 26 '07 #7
missinglinq
3,532 Expert 2GB
In Access it's not called Mouse Over it's called Mouse Move!
Jun 26 '07 #8
cough cough, oh yeah, thanks.
Jun 26 '07 #9
missinglinq
3,532 Expert 2GB
BTW, Screen.MousePointer = 15 does not change the cursor to a hand! The valid arguments are as follows:

Screen.MousePointer = 1 'Standard Cursor
Screen.MousePointer = 3 ' I Beam
Screen.MousePointer = 7 'Double Arrow Vertical
Screen.MousePointer = 9 'Double Arrow Horizontal
Screen.MousePointer = 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
File Type: zip CursorHack.zip (3.8 KB, 9499 views)
Jun 26 '07 #10
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
Jun 26 '07 #11
I've got it, if you just put a space into the Hyperlink address the hand is displayed! ;-)
Jun 26 '07 #12
Thanks it's working fine.

Dom
Jul 5 '07 #13
bluray
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.
Jul 5 '07 #14
topher23
234 Expert 100+
It's been a few years, but for anyone stumbling upon this post: Don't forget to set
Expand|Select|Wrap|Line Numbers
  1. 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.
Mar 5 '14 #15
This CursorHack code works perfectly. By the way, I've read a lot of posts on this and other forums and I have to say that your comments and solutions (Mr.MissingLink or Linq) were always correct, professional and expert. Thank you for making our programmers life a little easier.
Jan 17 '16 #16
Hoopla3000
7 Nibble
@missinglinq
Thank you missinglinq for the code. I was able to use this to work around another issue. If you have a textbox that is set to show the value as a hyperlink, so that the user sees the hand/finger cursor. I was using the OnClick event of the textbox to launch a form but nothing I would do would get the hand cursor to change to an hourglass. I suspect this is a bug in Access with the hyperlink feature.

Using the API code that you provided I am now able to change the cursor immediately.

I am adding to this old thread in case someone else is struggling with the cursor after clicking a hyperlink.
Feb 4 '19 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: netquest | last post by:
Hi, I have a tiny script that launches an instance of Internet Explorer. Is it possible for me to also change the mouse pointer, for that application or even the desktop, to a transparent...
1
by: MrNobody | last post by:
How can I customize DataGrid so that when the mouse hovers over certain columns the cursor changes to the Cursors.Hand cusror? I was unable to use the MouseEnter/MouseLeave events on DataGrid...
3
by: Tim | last post by:
Hi, How would I go about changing the windows mouse cursor ? (Not the mouse cursor on a form...but the actual mouse cursor in windows..) Any ideas would be greatly appreciated Thanks, Tim
3
by: larry mckay | last post by:
does anyone have a code sample that changes the mouse cursor to an hourglass or waitcursor ? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in...
8
by: Eddie | last post by:
Hi All, I just want to change the mouse cursor during a process. I want a hourglass... How may I do it ? Thx
1
by: .NetHelpWanted | last post by:
Hi All, I need a solution for the following scenario. I have 2 treeviews and one listview. the listview is populated with the contents of the treeview clicked. I have implemeted drag and...
1
by: gregarican | last post by:
Checking a couple of examples I tried changing the Tkinter mouse cursor to indicate a busy state while my app is pushing/pulling xmlrpc data. It doesn't seem to make a difference as I don't notice...
2
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
2
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
vs2008 c# Is it any way within the IDE to highlight mouse cursor or change it without changing for windows? I want a yellow circle around my mouse bean. any ideas? TIA
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.