?? tt1.frm
字號(hào):
VERSION 5.00
Begin VB.Form Form2
BackColor = &H8000000A&
BorderStyle = 4 'Fixed ToolWindow
Caption = " 機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)"
ClientHeight = 2745
ClientLeft = 3045
ClientTop = 4560
ClientWidth = 4680
ClipControls = 0 'False
ControlBox = 0 'False
Icon = "tt1.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2745
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.PictureBox Picture1
Height = 435
Index = 1
Left = 4095
Picture = "tt1.frx":08CA
ScaleHeight = 375
ScaleWidth = 480
TabIndex = 6
Top = 2100
Visible = 0 'False
Width = 540
End
Begin VB.PictureBox Picture1
Height = 435
Index = 0
Left = 4095
Picture = "tt1.frx":1194
ScaleHeight = 375
ScaleWidth = 480
TabIndex = 5
Top = 1470
Visible = 0 'False
Width = 540
End
Begin VB.Timer Timer2
Interval = 500
Left = 4305
Top = 840
End
Begin VB.Timer Timer1
Interval = 1000
Left = 4320
Top = 0
End
Begin VB.Label Label5
Caption = "歡迎你到本機(jī)房上機(jī)"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 840
TabIndex = 4
Top = 210
Width = 3270
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "本系統(tǒng)默認(rèn)按1小時(shí)計(jì)時(shí)"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 720
TabIndex = 3
Top = 2280
Width = 3150
End
Begin VB.Label Label3
Caption = "Label1"
Height = 255
Left = 360
TabIndex = 2
Top = 1905
Width = 3615
End
Begin VB.Label Label2
Caption = "Label1"
Height = 375
Left = 360
TabIndex = 1
Top = 1395
Width = 3615
End
Begin VB.Label Label1
Caption = "Label1"
Height = 375
Left = 360
TabIndex = 0
Top = 870
Width = 3615
End
Begin VB.Menu menumenu
Caption = "菜"
Visible = 0 'False
Begin VB.Menu menu1
Caption = "關(guān)于我們(&G)"
End
Begin VB.Menu menu2
Caption = "軟件簡(jiǎn)介(&J)"
End
Begin VB.Menu menu3
Caption = "-"
End
Begin VB.Menu menu4
Caption = "退出系統(tǒng)(&Q)"
End
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Dim rtn As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Private Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
ucallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Dim t As NOTIFYICONDATA
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const WM_MOUSEMOVE = &H200
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function OSfCreateShellLink Lib "Vb5stkit.dll" Alias "fCreateShellLink" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String) As Long
Private Declare Function OSfRemoveShellLink Lib "Vb5stkit.dll" Alias "fRemoveShellLink" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String) As Long
Dim begintime
Dim endtime
Public inttime As Integer
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal ProcessID As Long, ByVal ServiceFlags As Long) As Long
Dim lRecturned As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Const SPI_SCREENSAVERRUNNING = 97
Const WM_CLOSE = &H10
Const WM_QIOT = &H12
Dim HANDLE As Integer, N As Integer
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Sub cctv()
Dim wintext As String
wintext = "注冊(cè)表編輯器"
HANDLE = FindWindow(vbNullString, wintext)
PostMessage HANDLE, WM_CLOSE, 0, 0
End Sub
Private Sub Form_Click()
If AnotherInstance() Then
End
End If
Me.Show
End Sub
Private Sub Form_Load()
Label1.Caption = "你的開始時(shí)間為:" & Time
Label2.Caption = "你的現(xiàn)在時(shí)間為:"
Label3.Caption = "你的結(jié)束時(shí)間為:" & Hour(Time) + 1 & ":" & Minute(Time) & ":" & Second(Time)
Picture1(0).Picture = LoadPicture("d:\cheng\1.ico")
Picture1(1).Picture = LoadPicture("d:\cheng\2.ico")
t.cbSize = Len(t)
t.hwnd = Picture1(0).hwnd
t.uId = 1&
t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
t.ucallbackMessage = WM_MOUSEMOVE
t.hIcon = Picture1(0).Picture
t.szTip = "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)" & Chr$(0)
Shell_NotifyIcon NIM_ADD, t
Timer2.Enabled = True
App.TaskVisible = False
begintime = Now
Dim lResult As Long
' lresult = OSfCreateShellLink("..\..\desktop", "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)", _
' "c:\exe\ttt1.exe", "")
' lresult = OSfCreateShellLink("..\..\start menu", "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)", _
' "c:\exe\ttt1.exe", "")
' lresult = OSfCreateShellLink("test", "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)", _
' "c:\exe\ttt1.exe", "")
If AnotherInstance() Then
End
End If
RegisterServiceProcess GetCurrentProcessId, 1
Dim pOld As Boolean
Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
Firstform
guan
shubiao
Call noshow
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If AnotherInstance() Then
End
End If
Form2.WindowState = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer2.Enabled = False
t.cbSize = Len(t)
t.hwnd = Picture1(0).hwnd
t.uId = 1&
Shell_NotifyIcon NIM_DELETE, t
endtime = Now
N = DateDiff("N", begintime, endtime)
Dim fso As New FileSystemObject, txtfile As TextStream
If fso.FileExists("c:\aa\開機(jī)記錄.txt") Then
Set txtfile = fso.CreateTextFile("c:\aa\開機(jī)記錄.txt", True)
Set txtfile = fso.OpenTextFile(("c:\windows\開機(jī)記錄.txt"), ForAppending, True)
Else
Set txtfile = fso.OpenTextFile(("c:\exe\開機(jī)記錄.txt"), ForAppending, True)
End If
txtfile.Write "開機(jī)時(shí)間為:" & begintime
txtfile.Write " " & "關(guān)機(jī)時(shí)間為:" & endtime
txtfile.Write " " & "時(shí)間長(zhǎng)度為:" & N & "分鐘"
txtfile.WriteBlankLines 2
End Sub
Private Sub menu1_Click()
MsgBox "這是我用Visual Basic 6.0開發(fā)的一個(gè)小的應(yīng)用程序,主要用各種機(jī)房的計(jì)費(fèi)計(jì)時(shí)" & _
"我學(xué)vb已經(jīng)快一年的時(shí)間了。同時(shí)希望大家好好學(xué)習(xí),不要沉迷于OICQ和各類游戲之中。" & _
"歡迎大家與我聯(lián)系,E-Mail:chengzonghui@163.net主頁(yè):www.cheng.51.net.", vbInformation, "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)"
End Sub
Private Sub menu2_Click()
MsgBox "這是一個(gè)應(yīng)用于機(jī)房的小軟件,功能不能算太強(qiáng)大。它可以隱藏任務(wù)欄,關(guān)閉注冊(cè)表,開機(jī)自動(dòng)運(yùn)行" & _
"計(jì)費(fèi)計(jì)時(shí),反密碼竅取工具等功能。本軟件體積小巧,不占內(nèi)存,并且可以自帶安裝程序。", vbInformation, "機(jī)房自動(dòng)計(jì)費(fèi)計(jì)時(shí)系統(tǒng)"
End Sub
Private Sub menu4_Click()
frmLogin.Show
End Sub
Private Sub timer1_Timer()
guan
cctv
If AnotherInstance() Then End
inttime = inttime + 1
If inttime = 2 Then
Me.WindowState = 1
End If
If inttime = 3600 Then
Form4.Show
If cheng = False Then
rtn = FindWindow("Shell_traywnd", "") 'get the Window
Call SetWindowPos(rtn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End If
Form4.Label1.Caption = "對(duì)不起,你的上機(jī)時(shí)間(1個(gè)小時(shí))已到,歡迎你下次再來."
Form4.Label3.Caption = "如果你要繼續(xù)上機(jī),請(qǐng)與機(jī)房的管理員聯(lián)系,謝謝合作!"
Form4.WindowState = 2
End If
If inttime = 3420 Then
Form4.Show
Form4.Label1.Caption = "對(duì)不起,你的上機(jī)時(shí)間還有3分鐘,請(qǐng)你做好存盤及其它工作."
cheng = False
End If
If inttime = 3423 Then
Form4.Hide
End If
Label2.Caption = "你現(xiàn)在的時(shí)間為:" & Time
End Sub
Private Sub picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
If Hex(x) = "1E3C" Then
Me.PopupMenu menumenu
End If
End Sub
Private Sub timer2_Timer()
cctv
Static i As Long, img As Long
t.cbSize = Len(t)
t.hwnd = Picture1(0).hwnd
t.uId = 1&
t.uFlags = NIF_ICON
t.hIcon = Picture1(i).Picture
Shell_NotifyIcon NIM_MODIFY, t
Timer1.Enabled = True
i = i + 1
If i = 2 Then i = 0
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -