⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kz.frm

📁 此代码可以实现远程关闭网络计算机
💻 FRM
字号:
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form kz 
   Caption         =   "远程关闭网络计算机(控制)"
   ClientHeight    =   1860
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3540
   LinkTopic       =   "Form1"
   ScaleHeight     =   1860
   ScaleWidth      =   3540
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   405
      Left            =   1875
      TabIndex        =   5
      Top             =   1125
      Width           =   1470
   End
   Begin MSWinsockLib.Winsock Winsock1 
      Left            =   2835
      Top             =   240
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
      RemotePort      =   9999
   End
   Begin VB.CommandButton Command1 
      Caption         =   "关闭对方计算机"
      Height          =   405
      Left            =   390
      TabIndex        =   2
      Top             =   1125
      Width           =   1485
   End
   Begin VB.TextBox Text1 
      Height          =   360
      Left            =   270
      TabIndex        =   1
      Text            =   "001"
      Top             =   645
      Width           =   3060
   End
   Begin VB.Label Label1 
      Height          =   195
      Left            =   3495
      TabIndex        =   4
      Top             =   90
      Width           =   1695
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "联机状态"
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   435
      TabIndex        =   3
      Top             =   75
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "客户机名称"
      BeginProperty Font 
         Name            =   "MS Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   330
      Width           =   1575
   End
End
Attribute VB_Name = "kz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
  Winsock1.Protocol = sckTCPProtocol    '使用TCP协议
  Winsock1.LocalPort = 0    '动态地建立连接
  Winsock1.RemotePort = 9999  '设置要连接的远程端口号
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
  Winsock1.Close
  Winsock1.Accept requestID    '接受新连接
  Label1.Caption = "连线中"
 End Sub

Private Sub Command1_Click()   '关闭客户机
  Winsock1.Close
  Winsock1.Protocol = sckTCPProtocol    '使用TCP协议
  Winsock1.LocalPort = 0    '动态地建立连接
  Winsock1.RemotePort = 9999    '设置要连接的远程端口号
  Winsock1.Connect Text1.Text    '设置要连接的计算机名称
End Sub

Private Sub Command3_Click()
  End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -