stustarz Posted January 15, 2003 Posted January 15, 2003 Sorry if I may sound dull but in VB6 you said formname.mousecursor = vbWhatever - but how do you do this in vb.net? I have tried msdn but it doesn't seem to tell me how to do it programatically only via the properties window. Thanks again Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
*Experts* Volte Posted January 15, 2003 *Experts* Posted January 15, 2003 Me.Cursor = Cursors.Handis one example. Use the intellisense after 'Cursors.' to pick one of the cursors available. Quote
stustarz Posted January 15, 2003 Author Posted January 15, 2003 Thanks ever so much! Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
*Experts* Nerseus Posted January 16, 2003 *Experts* Posted January 16, 2003 (edited) Here's a helpful hint. When you want to change the cursor to an hourglass and make SURE you get it back before a function ends, use the following. It uses try/finally but doesn't really care about exceptions. It takes advantage of the fact that regardless of HOW you exit the try, the finally always runs. try { this.Cursor = Cursors.WaitCursor; // Do something here, even call "return;" } finally { this.Cursor = Cursors.Default; } -Nerseus edited to put in [ code ] blocks Edited January 16, 2003 by Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.