From 988af6570b1e637b8505c4b3c01accd524cf6af0 Mon Sep 17 00:00:00 2001 From: j502647092 Date: Fri, 7 Aug 2015 20:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AA=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E6=A8=A1=E5=9D=97...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: j502647092 --- Frm_Main.frm | 12 +++++++++++- MCServer_Protocol.vbw | 4 ++-- MC_TCP.bas | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) 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