Friday, September 7, 2018

C# - How change cursor and how to load own cursor

/* set cursor for current form */        
Cursor = Cursors.WaitCursor;
      
/* ..with exception for this button */
button1.Cursor = Cursors.Default;

/* load own cursor from file; and set it for one button */ 
Cursor myCursor = new Cursor( @"c:\cursorfilename.cur" );
if ( myCursor != null ) button2.Cursor = myCursor;

No comments:

Post a Comment