Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The code:

_parent.Cursor.Current = Cursors.WaitCursor;


Gives the following error:
CS0176: Member 'System.Windows.Forms.Cursor.Current.get' cannot be accessed with an instance reference; qualify it with a type name instead


So how do I properly qualify Current, which is a static member of Cursor?


Thanks - John.
Posted

As you are wanting to assign the cursor, you just need
C#
_parent.Cursor = Cursors.WaitCursor;
 
Share this answer
 
Thanks Reiss,

Assigning to Cursor works fine.

Just out of curiosity how would you reference the Current property if you wanted to?
 
Share this answer
 
Comments
Reiss 31-Oct-11 9:56am    
The same in reverse
Cursor currentCursor = _parent.Cursor

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900