Listing program
Dim IPServer As String
Dim xKirim As
String
Dim xData1() As String
Dim xData2() As String
Private
Sub cmdconnect_click()
IPServer = "192.168.10.1"
IPClient
= WS.LocalIP
WS.Connect IPServer, 1000
End Sub
Private
Sub cmddisconnet_Click()
WS.SendData "STOP-xxx"
End
Sub
Private Sub Form_Load()
Me.Caption = "CLIENT IP :"
& WS.LocalIP
biaya = ""
Pemakaian = ""
End
Sub
Private Sub WS_DataArrival(ByVal bytesTotal As Long)
WS.GetData xKirim, vbString, bytesTotal
Call CheckData
End Sub
Sub
CheckData()
xData1 = Split(xKirim, "-")
xData2 =
Split(xData1(1), "/")
Select Case xData1(0)
Case "PAKAI"
pakai.Value = xData2(0)
biaya.Text = xData2(1)
Pemakaian.Text = xData2(1) / 60
End Select
End Sub
Tidak ada komentar:
Posting Komentar