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

change cursor to hourglass (WaitCursor) between try..catch

A. I remember microsoft add some features about WaitCursor in
Window.Forms, but I not find it now?

B. I have some Try..Catch in some module and it's suppose to be long
time. I need to change cursor to hourglass. but I have two problem:

1. the function in module not have access to form, (unless I send me
into the module function, but I not like it)
2. if occur err and control jump to catch block, I need to write extra
code to return regular cursor before I open MsgBox with Error msg.

thanks

Jun 29 '06 #1
1 1667
Well in the described situation i would handle this with events

pseudo code :

Try
raisevent changecursorTowait
do long loop

catch ex as exception

finally
raiseevent changecursorTodefault
end try
this way the cursor will get back to normall state if
1. the code has finished or 2. a exception occurs

as the finally block will always execute
regards

Michel Posseth [MCP]

"mt******@yahoo.com" wrote:
A. I remember microsoft add some features about WaitCursor in
Window.Forms, but I not find it now?

B. I have some Try..Catch in some module and it's suppose to be long
time. I need to change cursor to hourglass. but I have two problem:

1. the function in module not have access to form, (unless I send me
into the module function, but I not like it)
2. if occur err and control jump to catch block, I need to write extra
code to return regular cursor before I open MsgBox with Error msg.

thanks

Jun 29 '06 #2

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

Similar topics

1
by: Tee | last post by:
Hi, From my main form, I am executing another application using System.Diagnostics.Process.Start. The application has its own window displaying when the applicaiton is run. I want to change...
5
by: Vlad Simionescu | last post by:
Hello I'm trying to let my Windows Form application perform a lengthy operation while displaying a progress bar in a modal dialog window; the dialog has a cancel button. The dialog is displayed...
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...
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
4
by: GatorBait | last post by:
Hi, I have created a class library that I call from within my program using late binding. The class library contains a form and I allow the user to do different actions on the form that is part of...
3
by: Wayne Wengert | last post by:
In VB.NET is there a way to set the mouse cursor to the Wait cursor that will stay in effect across several forms? For example, I want to set the cursor to the WaitCursor in formA just before it...
0
by: shumaker | last post by:
private void processImports_Click(object sender, EventArgs e) { statusLabel.Text = "Processing..."; this.Cursor = Cursors.WaitCursor; Application.DoEvents(); this.Enabled = false;...
6
by: Jan Heppen | last post by:
Is it posible to set something so that when my vb.net (visual studio 2005, framework 2.0) application is busy that the mouse pointer change into a hourglass ? Or do i have to set everywhere...
6
by: wil1cad2 | last post by:
I'm using VB studio 2005. Pls help to change cursor to HourGlass when u press a button and wait for calcualtion the result. Ex: If btnCalculate.Enabled = True Then ...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.