January 3rd, 2013, 08:37 AM
[RESOLVED] Do While loop for Button
I am using visual studio in form mode, where I am using a label and a button. The label is named as X. Now i want the label to change to Y while the button is pressed. When it is released, it will be re-named to X.
I tried the coding below but it didn't work:
Can someone please help me solve this problem please ?
private void button4_Click(object sender, EventArgs e)
label48.Text = "Y"; //when button pressed, change label to Y
while (button4 = false); //repeat till the button is released
label48.Text = "X"; //when released, use the label's original name i.e X
Thanks in advance.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!