Está en la página 1de 2

Private Sub Command1_Click() '2

If MSComm1.PortOpen = False Then


MSComm1.CommPort = Val(Combo1.Text)
MSComm1.PortOpen = True
Combo1.Enabled = False
Form1.Caption = "Puerto Activado" & MSComm1.CommPort
Else
MsgBox ("El puerto ya esta Abierto")
End If
End Sub
Private Sub Command2_Click() '3
MSComm1.PortOpen = False
Combo1.Enabled = True
End Sub
COMUNICACION ENTRE VENTANAS
Private Sub Command3_Click() '4
MSComm1.Output = Text1.Text & "-->" & Text2.Text
Timer1.Enabled = True
Text2.Text = ""
End Sub
'1
Private Sub Form_Load()
Combo1.AddItem ("1")
Combo1.AddItem ("2")
Combo1.AddItem ("3")
Combo1.AddItem ("4")
Combo1.AddItem ("5")
Combo1.AddItem ("6")
End Sub

Private Sub Timer1_Timer() '5


Dim a As Variant
a = MSComm1.Input

If a <> "" Then


Text3.Text = a
End If
End Sub
.-.-.-.-.-.-.-.-.-.Private Sub Command1_Click() '2
If MSComm1.PortOpen = False Then
MSComm1.CommPort = Val(Combo1.Text)
MSComm1.PortOpen = True
Combo1.Enabled = False
Form1.Caption = "Puerto Activado" & MSComm1.CommPort
Else
MsgBox ("El puerto ya esta Abierto")
End If
End Sub
Private Sub Command2_Click() '3
MSComm1.PortOpen = False
Combo1.Enabled = True
End Sub
Private Sub Command3_Click() '4
MSComm1.Output = Text1.Text & "-->" & Text2.Text
Timer1.Enabled = True
Text2.Text = ""
End Sub
'1
Private Sub Form_Load()
Combo1.AddItem ("1")
Combo1.AddItem ("2")
Combo1.AddItem ("3")
Combo1.AddItem ("4")
Combo1.AddItem ("5")
Combo1.AddItem ("6")
End Sub
Private Sub Timer1_Timer() '5
Dim a As Variant
a = MSComm1.Input
If a <> "" Then
Text3.Text = a
End If
End Sub

También podría gustarte

  • Carta de Smith
    Carta de Smith
    Documento9 páginas
    Carta de Smith
    elmorongas
    Aún no hay calificaciones
  • Motor Es
    Motor Es
    Documento1 página
    Motor Es
    Rogelio Martinez Carlo
    Aún no hay calificaciones
  • Comunicacion Entre Formul Serial Puerto
    Comunicacion Entre Formul Serial Puerto
    Documento2 páginas
    Comunicacion Entre Formul Serial Puerto
    Rogelio Martinez Carlo
    Aún no hay calificaciones
  • Resist SMD 1
    Resist SMD 1
    Documento8 páginas
    Resist SMD 1
    LCalcinaCmc
    Aún no hay calificaciones
  • Carta de Smith
    Carta de Smith
    Documento9 páginas
    Carta de Smith
    elmorongas
    Aún no hay calificaciones
  • 2 Examen
    2 Examen
    Documento1 página
    2 Examen
    Rogelio Martinez Carlo
    Aún no hay calificaciones
  • Examen Suma
    Examen Suma
    Documento1 página
    Examen Suma
    Rogelio Martinez Carlo
    Aún no hay calificaciones