fawadbutt
Member level 3
- Joined
- Oct 29, 2010
- Messages
- 61
- Helped
- 4
- Reputation
- 8
- Reaction score
- 4
- Trophy points
- 1,288
- Location
- Lahore, Pakistan, Pakistan
- Activity points
- 1,754
hi.. i create a application in visual studio 2010 using C#..
i m sending the character form Serial port when pressing the button ,when i press one time one ASCII character send via Serial Port.
the problem is ,,i want to make this type of button .when i press one time start sending character until i unpress the button.plz help me.
here is may code:
i m sending the character form Serial port when pressing the button ,when i press one time one ASCII character send via Serial Port.
the problem is ,,i want to make this type of button .when i press one time start sending character until i unpress the button.plz help me.
here is may code:
Code:
private void button5_Click(object sender, EventArgs e)
{
if (!serialPort1.IsOpen)
{ MessageBox.Show("First Open the Port"); return; }
else
{
serialPort1.Write("1");
}
}