当前位置:跳过导航链接计算机毕业设计首页 : VB计算机毕业设计 : 详细内容

VB局域网网络管理系统(8)

来源:xiaoniu168.com 作者:本站原创 添加时间:2014-11-27 点击数:30454

计算机毕业设计功能2介绍:

如果教师端发送了其他的命令,学生端同样执行相关的操作,点击关闭网络按钮系统将关闭网络。

以下是引用片段:

Private Sub btn关闭_Click()
Me.WinConnect.Close '断开连接
Me.Text1.Text = Me.Text1.Text & vbCrLf & "连接关闭" '操作记录显示
Me.btn连接.Enabled = True '将“连接”按钮设置为可用状态
Me.btn关闭.Enabled = False  '将“关闭”按钮设置为不可用状态
End Sub

Private Sub Text1_Change()
Me.Text1.SelStart = Len(Me.Text1.Text)
Me.Text1.SelLength = 1
End Sub

Private Sub WinConnect_Close()
Me.Text1.Text = Me.Text1.Text & vbCrLf & "连接关闭" '操作记录显示
Me.btn连接.Enabled = True  '将“连接”按钮设置为可用状态
Me.btn关闭.Enabled = False  '将“关闭”按钮设置为不可用状态
End Sub

Private Sub WinConnect_Connect()
Me.Text1.Text = Me.Text1.Text & vbCrLf & "连接完成" '操作记录显示
Me.btn连接.Enabled = False '将“连接”按钮设置为不可用状态
Me.btn关闭.Enabled = True  '将“关闭”按钮设置为可用状态
End Sub

Private Sub WinConnect_DataArrival(ByVal bytesTotal As Long) '接收到对方的信息的事件
Private Sub WinConnect_DataArrival(ByVal bytesTotal As Long) '接收到对方的信息的事件
Dim a As String
Me.WinConnect.GetData a   '把接收到的信息赋值给字符串a
If Mid(a, 1, 5) = "11-11" Then
End If
Select Case Mid(a, 1, 5)
Case "11-11"
   Me.Text1.Text = Me.Text1.Text & vbCrLf & Time & ":" & Mid(a, 6)
Case "22-21"
    Call GetScreen
    If Me.Picture2.Image <> 0 Then
       SavePicture Me.Picture2.Image, "C:\SendScreen.bmp"
       If Dir("C:\SendScreen.rar") <> "" Then
          Kill "C:\SendScreen.rar"
       End If
       Call AddRar
       Open "C:\SendScreen.rar" For Binary As #1
       ReDim aa(1 To LOF(1)) As Byte
       Get #1, 1, aa
    End If
    Me.WinConnect.SendData "22-22" & LOF(1)
    Close
    DoEvents
    Me.WinConnect.SendData aa
    DoEvents
Case "33-31"
    If Dir("c:\NewFolder") = "" Then
       MkDir ("c:\NewFolder")
    End If
Case "33-32"
    Open "C:\NewFile" For Binary As #1
    Put #1, 1, "hello"
    Close #1
Case "33-33"
    Shell "shutdown -s -t 1"
Case "33-34"
  '打开IE
   On Error Resume Next
   Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE ", 3
   On Error GoTo 0
Case "80-81"
   Me.Text1.Text = Me.Text1.Text & vbCrLf & Time & ":" & Mid(a, 6)
Case "66-61"
   '注销计算机
   ExitWindowsEx EWX_FORCE Or EWX_LOGOFF, 0
Case "66-62"
   '注销计算机
   ExitWindowsEx EWX_FORCE Or EWX_REBOOT, 0
Case "66-63"
   '打开光驱
   mciSendString "Set CDAudio Door Open Wait", 0&, 0&, 0&
Case "66-64"
   '打开光驱
   mciSendString "Set CDAudio Door Closed Wait", 0&, 0&, 0&
Case "66-64"
   '打开光驱
   mciSendString "Set CDAudio Door Closed Wait", 0&, 0&, 0&
Case "66-65"
   '隐藏任务栏
   ShowHide True
Case "66-66"
   '显示任务栏
   ShowHide False
Case "66-67"
   '隐藏按钮
   hideButton False
Case "66-68"
   '隐藏按钮
   hideButton True
Case "66-69"
   Me.WinConnect.SendData "66-70" & ListWindows
End Select
End Sub

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第9页为计算机毕业论文接上代码介绍......

上一篇:VB销售管理系统

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网
计算机毕业设计客服
计算机毕业论文客服在线 计算机毕业论文客服在线
计算机毕业论文在线,计算机毕业设计在线