473,324 Members | 2,313 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,324 software developers and data experts.

Cursor.Current reverting to default

Hi, I have a custom made toggle button, and I want to change the cursor
in my application when it's pressed.

I set the Cursor.Current property whenever that state changes, but on
mouseup it reverts back to the default cursor automatically.

I did a few tests, and putting a button in a blank form, setting the
Cursor.Current property OnMouseEnter, only changes the cursor in the
border of the button. If I keep moving it it reverts again to default.

Is there a way to force the cursor to stay as I set it until I manually
set it to Cursors.Default?

Regards,
Juan Manuel.

Nov 17 '05 #1
2 4236
Are you calling Application.DoEvents anywhere? From the docs:

If you call Application.DoEvents before resetting the Current property
back to the Cursors.Default cursor, the application will resume
listening for mouse events and will resume displaying the appropriate
Cursor for each control in the application.

Nov 17 '05 #2
Nope, I create a new project, add a button, change the cursor on the
Click event, and OnMouseUp the cursor reverts to default... I do
nothing else...

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Philip Mette | last post by:
Does anyone have any good references they could recommend on Cursor based SQL writing? I have to create SQL that can loop though records simular to VB loops and I have been told that this is the...
4
by: mphanke | last post by:
Hi, I have a snippet which makes me go mad! The clip region of the Cursor is set correctly, but I can't reset it anymore afterwards! This really drives me nuts, because I don't understand...
2
by: dave | last post by:
In my form Ive got a SaveData() routine that saves changes to a DB. When I encounter an exception in the save operations, I am having trouble chaning the cursor back to the default cursor, it just...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
1
by: TheSteph | last post by:
Hi ! - Using C# .NET 2.0 - How can I change the Cursor of THE WHOLE APPLICATION ?
7
by: Academic | last post by:
What are the different effects of the following two statements: C1.Cursor = Cursors.WaitCursor C1.Cursor.Current = Cursors.WaitCursor I believe the first replaces the entire C1.Cursor...
10
by: Franky | last post by:
I think I misread a post and understood that if I do: System.Windows.Forms.Cursor.Current = Cursors.WaitCursor there is no need to reset the cursor to Default. So I made all the reset...
4
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
Am I not supposed to be able to set the current cursor by assigning Cursor.Current? this.Cursor in the main dialog works, but not Cursor.Current other components. I am using a third party tool...
1
by: Chris Shepherd | last post by:
According to the docs, setting Cursor.Current will change the cursor being displayed, and block mouse events: "Setting the Current property changes the cursor currently displayed, and the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.