By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,711 Members | 1,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,711 IT Pros & Developers. It's quick & easy.

Change cursor in a Class Library

P: n/a
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 the class
library dll. I am having a hard time figuring out how to change the
cursor between an hourglass and arrow for those time periods when work
is being done. I have tried
Cursor = Cursors.WaitCursor and Cursor = Cursors.Arrow, but the class
library does not seem to know what the Cursors class is. Can someone
help?

Thanks a lot!

GB

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
"GatorBait" <MP****@gmail.com> schrieb
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
the class library dll. I am having a hard time figuring out how to
change the cursor between an hourglass and arrow for those time
periods when work is being done. I have tried
Cursor = Cursors.WaitCursor and Cursor = Cursors.Arrow, but the
class library does not seem to know what the Cursors class is. Can
someone help?

First, it doesn't matter if it's the same assembly or another one.

Second, you can set the Form's cursor property to change the cursor
permanently. Or, you can change the shared
System.Windows.Forms.Cursor.Current property. It will only stay as long as
the application is not idle. See <f1> for Cursor.Current.
Armin

Nov 21 '05 #2

P: n/a

"GatorBait" <MP****@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
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 the class
library dll. I am having a hard time figuring out how to change the
cursor between an hourglass and arrow for those time periods when work
is being done. I have tried
Cursor = Cursors.WaitCursor and Cursor = Cursors.Arrow, but the class
library does not seem to know what the Cursors class is. Can someone
help?


I believe the Cursors namespace is in System.Windows.Forms, so you would
need to say
Nov 21 '05 #3

P: n/a

"GatorBait" <MP****@gmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
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 the class
library dll. I am having a hard time figuring out how to change the
cursor between an hourglass and arrow for those time periods when work
is being done. I have tried
Cursor = Cursors.WaitCursor and Cursor = Cursors.Arrow, but the class
library does not seem to know what the Cursors class is. Can someone
help?


I believe the Cursors namespace is in System.Windows.Forms, so you would
need to say
System.Windows.Forms.Cursor.Current =
System.Windows.Forms.Cursors.WaitCursor
That may not be exactly right, but you should get the idea.
Nov 21 '05 #4

P: n/a
I got it resolved! Thank you and Armin and Rick for your help!!!

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.