Expand|Select|Wrap|Line Numbers
- timerCounter = 0
- timer.Interval = 30
- timer.Enabled = True
Expand|Select|Wrap|Line Numbers
- Me.timer = New System.Windows.Forms.Timer(Me.components)
Expand|Select|Wrap|Line Numbers
- messageInfo = ReadMessage(15)
- timerCounter += 1
- messageRead.Add(messageInfo)
Expand|Select|Wrap|Line Numbers
- System.Windows.Forms.Application.DoEvents()
My problem is that if the device is connected by the routine, the program crashes, but if it is connected before the program still runs. The device needs to be connected in the routine
What can i do? Is there another method like Refresh()? Should i look into multi-threading?