I am doing a project on vb6. I need to take some data from serial port and display it using a text box and label in vb6. But the problem is that the while loop does not run. It just executes every time on command click instead of changing continuously on itself. In my project the input to the serial port keeps changing continuously so how do I modify this code so that i can continuously read the input and change the display.
Private Sub Command_Click()
Dim sbuffer As String
If MSComm1.CommEvent=comEvReceive then sbuffer=sbuffer & MSComm1.Input
Private Sub Form_Load()
Private Sub MSComm1_OnComm()
If MSComm.PortOpen=True Then MSComm1.PortOpen=False