Professional Documents
Culture Documents
PROGRAM VB
Private Sub Command1_Click()
If Option1.Value = True Then
Shape1.BackColor = vbRed
MSComm1.Output = "H"
Label1.Caption = "HIDUP"
Else
Shape1.BackColor = vbWhite
End If
If Option2.Value = True Then
Shape1.FillColor = vbWhite
MSComm1.Output = "M"
Label1.Caption = "MATI"
Else
Shape1.FillColor = vbRed
End If
End Sub
Private Sub Form_Load()
MSComm1.PortOpen = True
End Sub