Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
please, I want to know how to make two events on one button like : when i first click on the button display an image and still in the debugging mode the second time i click
display another image what code can i use?
Posted
Comments
Irbaz Haider Hashmi 1-Feb-13 10:35am    
Your question is not that much clear right now.
You mean in debugging the first image you want to click the button again?

I think you need to look at Threading and Delegates for this.
Ahmed Mesbah 1-Feb-13 10:45am    
yes i mean that the first click do specific event and the second click do another one
(two events) on one button

Create a integer variable at class level, set it to one.
Every time you click the button, check the value of the variable and if it is greater than the number of images, set it back to 1.
Show that image number.
Increment the variable for next time.
 
Share this answer
 
Comments
fjdiewornncalwe 1-Feb-13 13:33pm    
+5. Agreed.
As an addition to Griff's answer. You could look at this[^] article on the logic behind a tri-state button.
 
Share this answer
 

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