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

Changing the cursor to an hourglas

I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is going on, an is likely to try clicking things multiple times which could result in an unwanted outcome.

Is there any way to change the mouse pointer to an hourglass or other such icon to signal the user that the request is being processed?

Thanks

Michael Albanese
Jul 21 '05 #1
4 2059
Hello Michael,

Thanks for your post. As I understand, you want to change the cursor in a
Web Form. Please correct me if there is any misunderstanding.

You can set the cursor to hourglas in the client script by calling the
following line:
document.body.style.cursor="wait";

As in this case, I suggest you to attach javascript click event to the
button (which will perform time-consuming database manipulateion) in the
page_onload like below:
Me.btnDBOperation.Attributes.Add("onclick", "waitcursor()")

And then change the cursor in the corresponding javascript function:

function waitcursor()
{
document.body.style.cursor="wait";
}

Please refer to the following MSDN article for detailed information:

cursor Attribute | cursor Property
http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/properties/cursor.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2
Hello Michael,

Thanks for your post. As I understand, you want to change the cursor in a
Web Form. Please correct me if there is any misunderstanding.

You can set the cursor to hourglas in the client script by calling the
following line:
document.body.style.cursor="wait";

As in this case, I suggest you to attach javascript click event to the
button (which will perform time-consuming database manipulateion) in the
page_onload like below:
Me.btnDBOperation.Attributes.Add("onclick", "waitcursor()")

And then change the cursor in the corresponding javascript function:

function waitcursor()
{
document.body.style.cursor="wait";
}

Please refer to the following MSDN article for detailed information:

cursor Attribute | cursor Property
http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/properties/cursor.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
Yes, I want to change the cursor in the web form and the client side
script you sent make a lot of sense.

Thanks!

Michael


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
Yes, I want to change the cursor in the web form and the client side
script you sent make a lot of sense.

Thanks!

Michael


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

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

Similar topics

3
by: Geoff Soper | last post by:
I'm trying to dynamically change the cursor of a couple of maps over an image. Basically the image is in an online photo system where there is a rotate mode. In this mode clicking on the left or...
2
by: malbanese | last post by:
I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is...
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
0
by: ahatzig | last post by:
Dear all, i have developed an application and the one thing that kept me busy i the cursor. From the MainFrm file i start an Interface Thread which is anothe dialog. The thing is, before the...
2
by: Dave | last post by:
Is there a way to enlarge the text cursor? We need to make it a bit wider to improve visibility and we cannot find any information about this. Many, MANY thanks in advance!
5
by: Craig G | last post by:
how do you change the cursor in Asp.Net? in windows app's i just used me.Cursor = Cursors.WaitCursor but it aint available in ASP.net
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...
5
by: mcraven.2 | last post by:
I know this works on all objects except drop down boxes. doc = document.all for (i=0;i<doc.length;i++) { doc(i).style.cursor = 'wait'; } Is it possible to make a cursor into an hourglass...
3
by: fbergroth | last post by:
Hi, I'm quite new to C# allthough I've been programming in other languages for quite a while. I'd like to change the blinking cursor inside a TextBox, I guess I must derive the class and...
0
by: IanWright | last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.