TextBox not displaying data

  • Thread starter Thread starter ElectroBatool
  • Start date Start date
E

ElectroBatool

Guest
I am working on an application where I am displaying data on Windows Forms. In the form I am using TextBox to display data and whenever code is run, it's not showing data. Also, it shows the cursor and it's allowing the user to type in the box. It's supposed to display string data and then send it to another device via Serial port.

This is my method that types the data inside the textbox, and writes it in the Serial port:

void OnDataDetected(string Data1)

{

textBox1.ReadOnly = true;

textBox.Text = string.Format("{0} : {1}", incomingData, DateTime.Now);

if (incomingData.Length != 0)

{

Port.Open();

Port.Write(incomingData);

Port.Close();

}}

Where could the issue be?

Continue reading...
 
Back
Top