private void readbtn_Click(object sender, EventArgs e)
{
if (sp.IsOpen)
{
try
{
readdatatxt.Text = "Reading...";
readdatatxt.Text = sp.ReadLine();
}
catch (Exception x)
{
readdatatxt.Text = "";
MessageBox.Show(String.Format("Could not read data from {0}.\r\nReason: {1}", sp.PortName, x.Message));
}
}
else
{
MessageBox.Show("Open the serial port first","Port not Open",MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
main:
readadc 4,b0
debug b0
pause 1000
goto main
I thought they were the same with VB.Net and C#.Net but different (32-bit) to VB6's Integer (16-bit) same as VB6's Long (32-bit). In most cases it shouldn't matter.@Dr_Acula: From what I can remember about vb.net (haven't touched it in 2-3 years) Dim count As Integer is not the same as int count;
main:
readadc 4,b0
debug b0
pause 1000
goto main