Private Sub Form_Load()
    On Error Resume Next
    Dim COM As Integer
    COM = 0
    COM = InputBox(" INSERISCI PORTA SERIALE ", "PORTA COM")
        MSComm1.CommPort = COM
        MSComm1.Settings = "19200,N,8,1"
        MSComm1.RThreshold = 1
        MSComm1.PortOpen = True
        Label1.Caption = "COM" & COM
        Shape1.FillColor = &HFF00&
        If Err Then
            Shape1.FillColor = &HFF&
        End If
End Sub
Private Sub MSComm1_OnComm()
 Dim Rx As String
 Rx = MSComm1.Input
 Text1.text=""
 If Len(Rx) Then ' legge il buffer di ricezione
    Text1.Text = Rx
 End If
 
 If Rx = "z" Then
    
    Label1.Caption = Rx
    Shape2.FillColor = &HFF&
 
 End If
End Sub
legacy wrote:domandilla, usi VB6 su XP ? se si che VB6 stai usando ?
esiste liberamente scaricabile ? quanti MB occupa ?
Users browsing this forum: No registered users and 5 guests