📄 frmmain.frm
字号:
VERSION 5.00
Begin VB.Form frmMain
AutoRedraw = -1 'True
BorderStyle = 0 'None
ClientHeight = 6390
ClientLeft = 120
ClientTop = 120
ClientWidth = 7635
ControlBox = 0 'False
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6390
ScaleWidth = 7635
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin VB.ListBox List1
Height = 960
Left = 600
TabIndex = 11
Top = 2640
Visible = 0 'False
Width = 1215
End
Begin VB.Timer Timer1
Interval = 100
Left = 2760
Top = 1800
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
BackColor = &H8000000A&
BorderStyle = 0 'None
Height = 3870
Left = 120
Picture = "frmMain.frx":0442
ScaleHeight = 3870
ScaleWidth = 6270
TabIndex = 0
Top = 120
Width = 6270
Begin VB.Frame Frame1
BackColor = &H00C7D0D4&
Caption = "请输入用户名及密码:"
Height = 1095
Left = 3360
TabIndex = 5
Top = 2040
Visible = 0 'False
Width = 2655
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 960
PasswordChar = "*"
TabIndex = 9
Top = 720
Width = 1455
End
Begin VB.TextBox Text1
Height = 270
Left = 960
TabIndex = 7
Top = 360
Width = 1455
End
Begin VB.Label Label3
BackColor = &H00C8D0D4&
BackStyle = 0 'Transparent
Caption = "密码:"
Height = 255
Left = 240
TabIndex = 8
Top = 720
Width = 615
End
Begin VB.Label Label2
BackColor = &H00C8D0D4&
BackStyle = 0 'Transparent
Caption = "用户名:"
Height = 255
Left = 240
TabIndex = 6
Top = 360
Width = 855
End
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmMain.frx":4F654
Left = 1080
List = "frmMain.frx":4F667
Style = 2 'Dropdown List
TabIndex = 4
Top = 2040
Width = 2055
End
Begin VB.CommandButton Command2
BackColor = &H00C7D0D4&
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 4440
Style = 1 'Graphical
TabIndex = 2
Top = 3240
Width = 975
End
Begin VB.CommandButton Command1
BackColor = &H00C7D0D4&
Caption = "确定"
Default = -1 'True
Height = 375
Left = 3000
Style = 1 'Graphical
TabIndex = 1
Top = 3240
Width = 975
End
Begin VB.Label Label4
BackColor = &H00C8D0D4&
BackStyle = 0 'Transparent
Height = 735
Left = 1200
TabIndex = 10
Top = 2400
Width = 1935
End
Begin VB.Label Label1
BackColor = &H00C8D0D4&
BackStyle = 0 'Transparent
Caption = "当前计算机处于等待状态,你想做什么?"
Height = 255
Left = 1080
TabIndex = 3
Top = 1680
Width = 4575
End
Begin VB.Image Image2
Height = 220
Left = 5950
Top = 80
Width = 255
End
Begin VB.Image Image1
Height = 975
Left = 360
Picture = "frmMain.frx":4F69B
Stretch = -1 'True
Top = 360
Width = 975
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cd105_Click()
On Error Resume Next
ShellExecute hwnd, "Open", "http://lihuasoft.yeah.net", "", SystemPath, 1
End Sub
Private Sub cd12_Click()
'选择商品
On Error Resume Next
Winsock1.SendData "_gets" + Chr(0) + "good"
DoEvents
End Sub
Private Sub cd13_Click()
'查看上机时间
On Error Resume Next
Winsock1.SendData "_gets" + Chr(0) + "time"
DoEvents
End Sub
Private Sub cd14_Click()
'查看储金卡
On Error Resume Next
frmGetCard.Show 0
End Sub
Private Sub cd15_Click()
'进入聊天室
On Error Resume Next
frmCharUser.Show
End Sub
Private Sub cdPause_Click()
On Error Resume Next
ShowFrmMain
End Sub
Private Sub cdQuickHTTP_Click(Index As Integer)
'快速
'MsgBox QuickHttp(Index).Host
On Error Resume Next
ShellExecute hwnd, "Open", QuickHttp(Index).Host, "", SystemPath, 1
End Sub
Public Sub Combo1_Click()
'发生改变事件
On Error Resume Next
Select Case Combo1.Text
Case "开始记费"
Frame1.Visible = False
Label4 = "通知主机并开始记费"
Combo1.Width = 4110
Label4.Width = 3870
Case "结帐"
Combo1.Width = 2055
Label4.Width = 1935
Frame1.ToolTipText = "在此输入储金卡帐号即可用储金卡结帐"
Label4 = "停止记费并要求结帐,在右边的对话框中输入储金卡帐号即可用储金卡结帐"
Frame1.Visible = True
Case "关机"
Combo1.Width = 2055
Label4.Width = 1935
Frame1.ToolTipText = "在此输入管理员用户名及密码才能进行关机"
Label4 = "关闭计算机,在右边的对话框中输入管理员用户名及密码才能关机"
Frame1.Visible = True
Case "重新启动"
Combo1.Width = 4110
Label4.Width = 3870
Frame1.Visible = False
Label4 = "重新启动计算机,但不停止记费"
Case "系统设置"
Combo1.Width = 2055
Label4.Width = 1935
Frame1.ToolTipText = "在此输入管理员用户名及密码才能进行系统设置"
Label4 = "在右边的对话框中输入管理员用户名及密码才能进行系统设置"
Frame1.Visible = True
Case "退出记费器"
Combo1.Width = 2055
Label4.Width = 1935
Frame1.ToolTipText = "在此输入管理员用户名及密码才能退出计费器"
Label4 = "在右边的对话框中输入管理员用户名及密码才能退出计费器"
Frame1.Visible = True
End Select
End Sub
Private Sub Command1_Click()
On Error Resume Next
Select Case Combo1.Text
Case "开始记费"
frmButton.Winsock1.SendData "_comm" + Chr(0) + "start"
DoEvents
Case "结帐"
frmButton.Winsock1.SendData "_vali" + Chr(0) + Text1.Text + Chr(0) + Text2.Text + Chr(0) + "cardend"
DoEvents
Case "关机"
frmButton.Winsock1.SendData "_vali" + Chr(0) + Text1.Text + Chr(0) + Text2.Text + Chr(0) + "shutdown"
DoEvents
Case "重新启动"
frmButton.Winsock1.Close
Reset
Case "退出记费器"
frmButton.Winsock1.SendData "_vali" + Chr(0) + Text1.Text + Chr(0) + Text2.Text + Chr(0) + "close"
DoEvents
Case "系统设置"
If frmButton.Winsock1.State = 7 Then
frmButton.Winsock1.SendData "_vali" + Chr(0) + Text1.Text + Chr(0) + Text2.Text + Chr(0) + "setup"
DoEvents
Else
If Text2.Text = GetSetting("网吧记费器", "Set", "password", "") Then
frmSetup.Show vbModal, Me
End If
End If
End Select
Text1.Text = ""
Text2.Text = ""
Combo1_Click
Unload Me
End Sub
Private Sub Command2_Click()
On Error Resume Next
'If NowJF Then
frmButton.tmrKey = True
Unload Me
frmLabel.Flash
frmButton.Flash
'End If
End Sub
Private Sub Form_Load()
On Error Resume Next
'初始化
'显示拖盘
frmButton.tmrKey = False
'
NoDelFormatComm = Val(GetSetting("网吧记费器", "Set", "NoDelFormatComm", "0"))
' SysComputerNum = Val(GetSetting("网吧记费器", "Set", "SysComputerNum", "0"))
'
Winsock1.Close
Combo1.Text = Combo1.List(0)
LoadScreen
End Sub
Private Sub Form_Resize()
On Error Resume Next
Picture1.Left = (Me.Width - Picture1.Width) / 2
Picture1.Top = (Me.Height - Picture1.Height) / 2 - 800
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmButton.tmrKey = True
Dim pOld As Boolean
If NowJF = True Then
SystemParametersInfoByRef 97, False, pOld, 0
End If
End Sub
Private Sub Image2_Click()
On Error Resume Next
Command2_Click
End Sub
Private Sub Image2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If Button = 1 Then Image2.BorderStyle = 1
End Sub
Private Sub Image2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then Image2.BorderStyle = 0
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
'寻找有破坏性的程序并关闭
List1.Clear
EnumWindows AddressOf EnumWindowsProc, 0&
End Sub
Public Sub LoadScreen()
On Error Resume Next
Dim hdc As Long, sx As Integer, sy As Integer
Dim hOldPattern As Long, bBmp(0 To 15) As Byte
Dim hBitmap As Long, hPattern As Long, hDCScreen As Long
Dim pOld As Boolean
SystemParametersInfoByRef 97, True, pOld, 0
sx = Screen.Width \ Screen.TwipsPerPixelX
sy = Screen.Height \ Screen.TwipsPerPixelY
hdc = GetDC(0)
'抓图
BitBlt Me.hdc, 0, 0, sx, sy, hdc, 0, 0, vbSrcCopy
ReleaseDC 0, hdc
bBmp(0) = &H55: bBmp(2) = &HAA: bBmp(4) = &H55: bBmp(6) = &HAA
bBmp(8) = &H55: bBmp(10) = &HAA: bBmp(12) = &H55: bBmp(14) = &HAA
'使屏幕变暗
For TmpLoop = -639 To 799 Step 2
Me.Line (TmpLoop * 15, 0)-((TmpLoop + 639) * 15, 639 * 15)
Me.Line ((TmpLoop + 640) * 15, 1)-(TmpLoop * 15, 640 * 15)
Next TmpLoop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -