|
-
January 3rd, 2013, 01:37 PM
#2
Re: Do While loop for Button
You could use the MouseDown and MouseUp events.
MouseDown would be for when the button is pressed, MouseUp would be for when the mouse button is released.
MouseDown:
http://msdn.microsoft.com/en-gb/libr...(v=vs.71).aspx
MouseUp:
http://msdn.microsoft.com/en-gb/libr...(v=vs.71).aspx
For example:
Add these 2 methods.
public void Button4_MouseUp(object sender, MouseEventArgs e) {
label48.Text = "X";
}
public void Button4_MouseDown(object sender, MouseEventArgs e) {
label48.Text = "Y";
}
And then on the design form, click on the "button4" and select the list of events (the little lightening icon near the properties).
scroll down to the events "MouseDown" and "MouseUp" and select the relevant methods created.
Arrokai
Last edited by arrokai; January 3rd, 2013 at 01:58 PM.
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
|