📄 form3.frm
字号:
VERSION 5.00
Begin VB.Form Form3
BorderStyle = 0 'None
ClientHeight = 750
ClientLeft = 0
ClientTop = 0
ClientWidth = 4695
LinkTopic = "Form3"
ScaleHeight = 750
ScaleWidth = 4695
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Timer Timer1
Interval = 1000
Left = 1800
Top = 120
End
Begin VB.Line Line4
X1 = 4680
X2 = 4680
Y1 = 0
Y2 = 720
End
Begin VB.Line Line3
X1 = 4680
X2 = 0
Y1 = 720
Y2 = 720
End
Begin VB.Line Line2
X1 = 0
X2 = 0
Y1 = 0
Y2 = 720
End
Begin VB.Line Line1
X1 = 0
X2 = 4680
Y1 = 0
Y2 = 0
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "正在启动葡萄守护者..."
Height = 255
Left = 360
TabIndex = 0
Top = 240
Width = 4095
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_ALPHA = &H2
Private Const LWA_COLORKEY = &H1
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) 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
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Dim xs As Boolean
Dim tmp1 As String * 255
Dim GSystemPath As String
Private Sub Form_Load()
If isNt.isNt = False Then
MsgBox "本程序不能在非NT系统下运行", 16
End
End If
'---透明窗体代码
Dim rtn As Long
rtn = GetWindowLong(Me.hwnd, GWL_EXSTYLE) '取的窗口原先的样式
rtn = rtn Or WS_EX_LAYERED '使窗体添加上新的样式WS_EX_LAYERED
SetWindowLong Me.hwnd, GWL_EXSTYLE, rtn '把新的样式赋给窗体
SetLayeredWindowAttributes Me.hwnd, 0, 200, LWA_ALPHA
'---------------
SetWindowPos Me.hwnd, -1, Me.left / Screen.TwipsPerPixelX, Me.top \ Screen.TwipsPerPixelY, Me.Width \ Screen.TwipsPerPixelX, Me.Height \ Screen.TwipsPerPixelY, 0:
Me.WindowState = 0
'--------
GetSystemDirectory tmp1, 256
GSystemPath = StrConv(tmp1, Unicode)
If Scanfile(GSystemPath & "\MSVCRTD.DLL") = False Then
FileCopy App.Path & "\MSVCRTD.DLL", GSystemPath & "\MSVCRTD.DLL"
End If
'--------
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Timer1_Timer()
Form1.Show
Me.Hide
Timer1.Enabled = False
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -