Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

visual studio button sending serial data

Status
Not open for further replies.

fawadbutt

Member level 3
Member level 3
Joined
Oct 29, 2010
Messages
61
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Lahore, Pakistan, Pakistan
Visit site
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:


Code:
      private void button5_Click(object sender, EventArgs e)
        {
            if (!serialPort1.IsOpen)
            { MessageBox.Show("First Open the Port"); return; }
            else
            {
                serialPort1.Write("1");
            }
        }
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top