R
RG
I am reading in from a serial port a 16 bit number from 0 to 65536. It
is being read as a string from my microcontroller into VB using DEC5
or 5 digits are displayed. I need to display this value live as a
decimal number so I can manipulate the value.
For instance I have the following line:
TextBox2.Text = buffer1 - 32768
but this generates an error after a few iterations because buffer1 is
a string.
I tried using a label.text also but I get the same problem.
Is there a different control to display numbers?
If not I assume I need to convert.todouble(buffer1).
But this also casues an error.
I also tried converting to double then back to text to display in the
textbox but I am still getting errors.
buffer1 = Convert.ToDouble(buffer1)
buffer1 = buffer1 - 32768
TextBox2.Text = Convert.ToString(buffer1)
Any help would be appreciated.
is being read as a string from my microcontroller into VB using DEC5
or 5 digits are displayed. I need to display this value live as a
decimal number so I can manipulate the value.
For instance I have the following line:
TextBox2.Text = buffer1 - 32768
but this generates an error after a few iterations because buffer1 is
a string.
I tried using a label.text also but I get the same problem.
Is there a different control to display numbers?
If not I assume I need to convert.todouble(buffer1).
But this also casues an error.
I also tried converting to double then back to text to display in the
textbox but I am still getting errors.
buffer1 = Convert.ToDouble(buffer1)
buffer1 = buffer1 - 32768
TextBox2.Text = Convert.ToString(buffer1)
Any help would be appreciated.