Program Koneksi Port Usb di Visual Basic 6.0

·         Modul program koneksi port usb

Private Sub connect_Click()
If MSComm1.PortOpen = False Then
    MSComm1.CommPort = 2
    MSComm1.RThreshold = 1
    MSComm1.InputLen = 40
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.PortOpen = True
    connect.Enabled = False
    disconnect.Enabled = True
    status.Caption = "Status Terkoneksi"
    MsgBox "Status Program Dengan MC Terkoneksi", vbOKOnly, "Laporan"
End If
End Sub

·         Modul program pemutussan koneksi port serial

Private Sub disconnect_Click()
If MSComm1.PortOpen = True Then
    MSComm1.PortOpen = False
End If
connect.Enabled = True
disconnect.Enabled = False
Text1.Enabled = False
status.Caption = "Status Tidak Terkoneksi"
End Sub

Untuk langkah2 pembuatan programnya nanti nyusul ya guy... saya belum nemu filenya save di folder mana.. :D

Comments