472,805 Members | 1,225 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 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 97043
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, 9463 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
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.