📄 启动.frm
字号:
VERSION 5.00
Begin VB.Form 启动
BorderStyle = 3 'Fixed Dialog
Caption = "启动"
ClientHeight = 8670
ClientLeft = 45
ClientTop = 330
ClientWidth = 11940
Icon = "启动.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 578
ScaleMode = 3 'Pixel
ScaleWidth = 796
ShowInTaskbar = 0 'False
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 5000
Left = 480
Top = 4890
End
Begin VB.Image Image2
Height = 1380
Left = 720
Picture = "启动.frx":0442
Top = 2970
Width = 10500
End
Begin VB.Image Image1
Height = 1380
Left = 2190
Picture = "启动.frx":33B2
Top = 690
Width = 7500
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "2002 年 2 月"
BeginProperty Font
Name = "仿宋_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 405
Left = 4770
TabIndex = 1
Top = 6990
Width = 2955
End
Begin VB.Label Label19
BackStyle = 0 'Transparent
Caption = "程序设计:姚 巍"
BeginProperty Font
Name = "仿宋_GB2312"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 405
Left = 4260
TabIndex = 0
Top = 5610
Width = 3585
End
End
Attribute VB_Name = "启动"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'API函数声明
Private Declare Function CreateSolidBrush Lib "gdi32" _
(ByVal crColor As Long) As Long
Private Declare Function FillRect Lib "User32" _
(ByVal hdc As Long, lpRect As RECT, _
ByVal hBrush As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" _
(ByVal hObject As Long) As Long
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwflags As Long) As Long
'相关常量声明
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
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 X As Long, _
ByVal hWndInsterAfter As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private m_MidiFile1 As String
Private m_Media As String
Dim hWndl As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Private Sub Form_Click()
Timer1.Enabled = False
用户登录.Show
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii <> 0 Then
Timer1.Enabled = False
用户登录.Show
End If
End Sub
Private Sub Form_Load()
Dim Q As String, Path As String
Dim W As Integer
Q = Me.hwnd
W = 0
Disabled Q, W
启动.ScaleWidth = 795
启动.ScaleHeight = 573
Call PlaySound(App.Path + "\Windows 登录音.wav", 0&, &H1)
hWndl = FindWindow("Shell_traywnd", "")
SystemParametersInfo SPI_GETWORKAREA, vbNull, VarPtr(apiRECT), 0
Open App.Path + "\" + "Screen.txt" For Output As #1
Write #1, apiRECT.Right
Close #1
SetDisplayMode 800, 600, 16
Call SetWindowPos(hWndl, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
Private Sub Timer1_Timer()
Open App.Path + "\" + "Screen.txt" For Output As #1
Write #1, apiRECT.Right
Close #1
Timer1.Enabled = False
用户登录.Show
End Sub
'窗体的Paint事件
Private Sub Form_Paint()
Dim Color As Integer
Dim hBrush As Long
Dim OldMode As Integer
Dim RetVal As Integer
Dim StepSize As Integer
Dim X As Integer
Dim FillArea As RECT
OldMode% = Me.ScaleMode
Me.ScaleMode = 3
StepSize% = 1 + Me.ScaleHeight / 80
Color% = 255
FillArea.Left = 0
FillArea.Right = Me.ScaleWidth
FillArea.Top = 0
FillArea.Bottom = StepSize%
For X% = 1 To 80
'创建刷子句柄
hBrush = CreateSolidBrush(RGB(10, 22, Color%))
'用刷子填充
RetVal% = FillRect(Me.hdc, FillArea, hBrush)
'删除刷子
RetVal% = DeleteObject(hBrush)
Color% = Color% - 4
If Color% < 0 Then Color% = 0
FillArea.Top = FillArea.Bottom
FillArea.Bottom = FillArea.Bottom + StepSize%
Next
Me.ScaleMode = OldMode%
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -