diff --git a/Frm_Main.frm b/Frm_Main.frm index f9cc28d..2cabd68 100644 --- a/Frm_Main.frm +++ b/Frm_Main.frm @@ -12,6 +12,14 @@ Begin VB.Form Frm_Main MinButton = 0 'False ScaleHeight = 8385 ScaleWidth = 8880 + Begin VB.Frame b + Caption = "未连接" + Height = 4680 + Left = 75 + TabIndex = 44 + Top = 3720 + Width = 8820 + End Begin VB.TextBox protocolver Height = 300 Left = 6075 @@ -560,11 +568,13 @@ Private Sub Wsk_Close(Index As Integer) Wsk(Index).Close If autosend.Value = 1 Then Wsk(Index).connect addr, port keeplive(Index).Enabled = False + b.Visible = True End Sub Private Sub Wsk_Connect(Index As Integer) Dim tempip As String Dim rndusername As String + b.Visible = False List1.AddItem Index & " 连接到服务器!" List1.AddItem Wsk(Index).RemoteHostIP Text1(0) = Encode(addr.Text & ":" & port.Text, EncodeIP, "00-" + hhex(protocolver.Text), "01") @@ -598,7 +608,7 @@ Private Sub Wsk_DataArrival(Index As Integer, ByVal bytesTotal As Long) Wsk(Index).GetData bytes, vbByte + vbArray If getdatac.Value = 1 Then For i = LBound(bytes) To UBound(bytes) - Temp = Temp & hex(bytes(i)) & " " + Temp = Temp & hhex(bytes(i)) & " " DoEvents Next List1.AddItem Temp diff --git a/MCServer_Protocol.vbw b/MCServer_Protocol.vbw index 2feeda4..982cc3e 100644 --- a/MCServer_Protocol.vbw +++ b/MCServer_Protocol.vbw @@ -1,3 +1,3 @@ -MC_TCP = 327, 29, 1823, 725, -Frm_Main = 0, 0, 1496, 615, , 22, 22, 644, 715, C +MC_TCP = 643, 21, 2139, 717, +Frm_Main = 712, 33, 1473, 648, , 22, 22, 644, 715, C UTF8COde = 0, 0, 0, 0, C diff --git a/MC_TCP.bas b/MC_TCP.bas index 02a916c..315d623 100644 --- a/MC_TCP.bas +++ b/MC_TCP.bas @@ -55,7 +55,7 @@ Function hextobyte(hex As String) hextobyte = bytes End Function -Public Function hhex(data As Long) As String +Public Function hhex(ByVal data As Long) As String Dim Temp As String Temp = hex(data) If Len(Temp) = 1 Then Temp = "0" + Temp