📄 main.bas
字号:
Attribute VB_Name = "basMain"
Option Explicit
'Application info for display in the Splash and About forms.
Public Const pcstrAppPlatform As String = "Win 95/98/NT4"
'API declaration used to ensure Splash screen stays on top.
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const GWL_HWNDPARENT = (-8)
Sub Main()
On Error GoTo HandleErrors
frmSplash.Platform = pcstrAppPlatform
frmSplash.Show
'Ensure the Splash form is refreshed prior to displaying the Main form.
DoEvents
'---------------------------------------------------------------------------------------------------------------------
'Perform other start up tasks here...
'For demo purposes we add a delay to simulate a typical applications initialisation.
DemoDelay
'---------------------------------------------------------------------------------------------------------------------
frmMain.Show
DoEvents
Unload frmSplash
ExitHandleErrors:
Exit Sub
HandleErrors:
MsgBox Err.Description & " (" & Err.Number & ")", vbCritical, App.Title & " Error"
Resume ExitHandleErrors
End Sub
Public Sub DemoDelay()
On Error Resume Next
Dim sngStartTime As Single
sngStartTime = Timer
Do Until (Timer - sngStartTime) > 4
DoEvents
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -