How to split data when qr code reader device read c#?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmedsa
    New Member
    • Jan 2014
    • 5

    How to split data when qr code reader device read c#?

    Problem

    cannot split data received by reading qr to text boxes when read qr code data ?

    Details

    I have device reader to qr code i only connect USB to computer then

    create text file and open it to receive data and read qr then receive data

    to this file and it work success .

    I work in windows form application c# visual studio 2015

    I need to receive data result from reading qr in windows form directly from

    device reader .

    I put mouse cursor in text box i receive data below :

    30 General Conference of Arab Pharmaceutical Unions UserName :
    michel bondq Country : Egypt Membership : part

    Note : formate above is fixed only variable username,countr y,Membership

    IF i need to read data from device and receive result directly from device

    reader in windows form application as following :

    textbox1 michel bondq

    textbox2 Egypt

    textbox3 part

    How to separate data to text boxes as above :

    meaning i need to split after (:) but i cannot do that

    what i try

    in textbox4 text changed

    Code:
    string[] sStringResult = textBox4.Text.Split(':');
    
            textBox1.Text = sStringResult[1].Trim();
    
            textBox2.Text = sStringResult[2].Trim();
    
            textBox3.Text = sStringResult[3].Trim();
    But it now work so that how to split data ?
Working...