473,385 Members | 1,396 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.

Change cursor in a Class Library

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
4 3855
"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

"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

"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
I got it resolved! Thank you and Armin and Rick for your help!!!

Nov 21 '05 #5

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

Similar topics

3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
2
by: Tippy G | last post by:
Can someone please give me an example of how to change the mousepointer to an hourglass or whatever other constant in VB.NET? I need to do it from a start-up module (VB6 days would have been...
11
by: Yeah | last post by:
I have a multiple choice quiz where I would like to use CSS to change the color of the answers upon clicking them. I would like to present the right and wrong answers up front, rather than direct...
9
by: Christian Blackburn | last post by:
Hi Gang, In VB6 is was relatively easy to change the pointer, but now I don't even see that as a property for any objects. Can somebody tell me how to do that in .NET? Thanks in Advance,...
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: Peter Oliphant | last post by:
I've now asked how three times in this forum with no answers. So I went to the 'windowsforms' newsgroup, and found this post, also unanswered, with the same problem: "Hello, I've tried to...
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...
4
by: =?Utf-8?B?Sm9hY2hpbQ==?= | last post by:
Am I not supposed to be able to set the current cursor by assigning Cursor.Current? this.Cursor in the main dialog works, but not Cursor.Current other components. I am using a third party tool...
2
by: Jassim Rahma | last post by:
how can i change the cursor of the textbox to the block style?
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.