473,568 Members | 2,939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling form changes cursor to an arrow.

private void processImports_ Click(object sender, EventArgs e)
{
statusLabel.Tex t = "Processing..." ;
this.Cursor = Cursors.WaitCur sor;
Application.DoE vents();
this.Enabled = false;
progressBar.Val ue = 0;

try{... lots of processing}
....
finally{
this.Cursor = Cursors.Arrow;
this.Enabled = true;
this.progressBa r.Value = 0;
}

}

The cursor isn't supposed to get changed back until after a great deal
of processing, but as soon as I set the form Enabled = false, then the
cursor changes to arrow again(I barely see the hourglass flash). If I
remove the Enabled=false, then the hourglass stays until the end.

My goal is to have an hourglass and ignore all clicks with something
hopefully simple. Otherwise I'll just settle for no hourglass.

Jun 27 '06 #1
0 1143

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

Similar topics

20
2954
by: Brian | last post by:
I'm wondering what the group thinks is the best way to display the <label> element. The default rendering in Moz and MSIE/Win (probably others, too) only changes the mouse cursor (that's a strange term) from text-select to default (an arrow). That, to me, is too subtle, and is a bit like "mystery meat" navigation. The user must hover the mouse...
5
1412
by: Tim Johnson | last post by:
Howdy: I'm just learning how to use focus() and select(). I have a very large form (360+ elements). Javascript validation is launched by the 'onclick' event handler in the "submit" button tag. Problem: When the element to be validated is not on the screen - since the form is larger than the screen, then there are no visual cues to help
3
1708
by: Mike | last post by:
That is exactly what I am looking for. Just one thing, after I turn the cursor into a wait cursor, is there a way to disable all the controls (e.g buttons, textboxes) so that I can't click on anything, or do I have to disable each control individually. Again , thanks for the reply. >-----Original Message----- >Mike, >
7
5763
by: Seash | last post by:
Hi friends , here is the sample code private void txtbox_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if(e.KeyChar == 13) //enter { txtbox2.Focus(); }
10
17315
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) stored in Me.Cursor. Or is Cursors.Default some process wide cursor shape? What is a correct statement?
4
6557
by: David Veeneman | last post by:
I'm creating a UserControl that uses a LinkLabel. For reasons that I won't bore everyone with, I don't want the LinkLable to show the default hand cursor when the mouse enters the control. Should be a simple setting on the LinkLabel.Cursor property, right? Not so simple. I set the property, but still got the default 'hand' cursor. To debug,...
6
1939
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to implement the following: If the user clicks on the border of a form, then I want to show a box around the form that represents the form's bounds. As the user moves the mouse only the box's bounds would change. When the user releases the mouse the form's bounds would be set to the bounds of the box. Note that this is very similar...
2
3138
by: ChipR | last post by:
I'm suddenly having a major problem trying to switch between rows in a continuous form in Access 2007. The form represents a timesheet and has a row for each activity that an employee may work on. There are 14 columns on the form for the days in the pay period, and each day is a text box, basically simulating a spreadsheet. So a row is a record...
4
6264
by: beary | last post by:
Hi Being tested using FF 3 on WAMP server. I have spent a number of hours trying to figure this out myself. I have a html form using table cells and had a request to enable the arrow keys on a keyboard to move through the cells. I found some code and adapted it, and it works well now. Arrow keys move the cursor exactly to the correct cell....
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7916
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.