dom_paq Posted September 16, 2003 Posted September 16, 2003 Hi, I control librairy project with visual studio.net and I'm having trouble changing the mouse cursor in my UserControl. The cursor changes fine but the application hangs(1/2 of the times) when I try to close it. this is a control librairy project so a UserControl derived class that I've added two event handlers for mouseDown and MouseUp, the rest is auto-generated code: private void ReproduceProblem_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { this.Cursor = Cursors.Hand; } private void ReproduceProblem_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { this.Cursor = Cursors.Default; } So if anyone knows why this crashes when the application is closed, I would be very greatfull. thanks in advance dominic Quote
aewarnick Posted September 16, 2003 Posted September 16, 2003 You didn't provide enouph info, everything you posted looks good. I don't think changing the mouse cursor as you did is the problem. What error message are you getting? Can you post all the code, or another problem area? Quote C#
dom_paq Posted September 16, 2003 Author Posted September 16, 2003 Thanks for replying, I'm having a hard time with this problem. The code that I provided is the only code I added. The rest is code generated by VS.Net for a Control librairy project. I put the file as an attachment if you find something domusercontrol1.cs Quote
aewarnick Posted September 16, 2003 Posted September 16, 2003 I didn't see anything that would cause a problem. And have you tried removing changing the mouse cusors to see if the problem persists? Quote C#
*Experts* mutant Posted September 17, 2003 *Experts* Posted September 17, 2003 The control works fine for me. What is the exact error message you are getting if you are getting any? Quote
dom_paq Posted September 17, 2003 Author Posted September 17, 2003 I don't get any error messages, I execute in debug mode and when I close the form (the form that has an instance of the control on it) visual stdio stays in debug mode. The output window never displays the message:The program '[3492] testReproduceProblem.exe' has exited with code 0 (0x0) However in Release mode everything is fine ???? Quote
dom_paq Posted September 17, 2003 Author Posted September 17, 2003 aewarnick: Yes when I remove the changing cursor stuff everything is fine. Quote
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.