473,396 Members | 1,833 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,396 software developers and data experts.

force waitcursor

Hi,

In my VB.NET code, at a certain moment I set the cursor to the
hourglass:

Cursor = System.Windows.Forms.Cursors.WaitCursor

Then a lot of things happen in my form, but also in other controls on
the form or loaded in memory (but not actually on the form)...
Afterwards, I set my cursor back to normal:

Cursor = System.Windows.Forms.Cursors.Default

But in reality, the cursor changes back to normal way before I want
that.
In the MSDN library they say that this happens when calling
Application.DoEvents, but that's not the case here. I don't have a
single Application.DoEvents in the code in between.

What I would like to know is how I can force the waitcursor to stay
until the moment that I want to set it back to normal?

Any help would be appreciated...

Veerle

Nov 21 '05 #1
1 2019
Hi Veerle,

AFAIK that can happen because of the DoEvents statement, or because other
procedure is setting it back to Default. So, I would simplify your code
removing calls to procedures until you find who is resetting it. I have had
to do that in the past.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

<ve*********@hotmail.com> escribió en el mensaje
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,

In my VB.NET code, at a certain moment I set the cursor to the
hourglass:

Cursor = System.Windows.Forms.Cursors.WaitCursor

Then a lot of things happen in my form, but also in other controls on
the form or loaded in memory (but not actually on the form)...
Afterwards, I set my cursor back to normal:

Cursor = System.Windows.Forms.Cursors.Default

But in reality, the cursor changes back to normal way before I want
that.
In the MSDN library they say that this happens when calling
Application.DoEvents, but that's not the case here. I don't have a
single Application.DoEvents in the code in between.

What I would like to know is how I can force the waitcursor to stay
until the moment that I want to set it back to normal?

Any help would be appreciated...

Veerle

Nov 21 '05 #2

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

Similar topics

2
by: seash | last post by:
H i had set WaitCursor for some processing in my application, This works fine for my Windowsform, but i want to extend this wait cursor to all other programs i.e only waitcursor(hourglass) should...
2
by: KarenP | last post by:
In my Windows Forms application, while executing a process that takes some time, I am changing the cursor to the hourglass by setting Cursor.Current = Cursors.WaitCursor. This is working just...
2
by: Lenster | last post by:
I am trying to show an hourglass mouse cursor and disable the main form whilst waiting for some activity to finish. The problem I have come across is that as soon as you disable the main form the...
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)...
6
by: Lars | last post by:
Hi, I have created a simple custom PrintPreviewDialog consisting of a simple standard PrintPreviewControl (.NET 1.1) on a WindowsForm with a few buttons (for printing, zooming, etc.). It is...
0
by: Netter | last post by:
I'm confused about: System.Windows.Forms.Cursor.Current = Cursors.WaitCursor Seems I read in this NG that it is not necessary to reset Cursor.Current because it gets reset automatically. Maybe...
1
by: =?Utf-8?B?bWdvbnphbGVzMw==?= | last post by:
I am unable to find the documentation on rotating the WaitCursor. ----- code --------- try { this.Cursor = Cursors.WaitCursor; // more code } catch
0
by: =?Utf-8?B?a20=?= | last post by:
I've got a simple C# app built in VS2005. When I click a menu item a modal form opens and performs a lengthy operation in the Load event handler to populate a text control, so it takes a few...
1
by: =?Utf-8?B?TWFuaXNoIEJhZm5h?= | last post by:
Hi, I have tried hard but not able to show waitcursor in betwen different processes.I launch new application from current application by using system.diagnostics.proceesstartinfo.Till second...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.