|
-
Feb 1st, 2003, 10:47 AM
#1
Thread Starter
Frenzied Member
Disable click on picturebox
I have a picturebox that is clickable on my form. I would like to disable the click at a certain time but when I use
pictureBox1.Enabled=false;
to disable it the gif animation stops. How can I disable the click without stopping the animation?
-
Feb 1st, 2003, 07:02 PM
#2
PowerPoster
You have to unsubscribe from the delegate:
this.pictureBox1.Click -= new System.EventHandler(this.pictureBox1_Click);
To resubscribe to it:
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
Basically, go into the windows form generated code and find where visual studio put the subscribe call to the delegate, and use the same exact statement where you need it but just replace the + sign with a minus sign and it will unsubscribe the delegate.
Last edited by hellswraith; Feb 1st, 2003 at 07:07 PM.
-
Feb 4th, 2003, 05:37 PM
#3
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|