打开时所显示的一个小块页面:添加一个无标题栏的窗体并设置为居中。设置窗体的背景为一张图片。在上面放一个Timer控件,设置其tag=10。用timer控件做一个倒计时,然后退出,再显示主窗体就行了。sub timer1_timer() timer1.tag=timer1.tage-1 if timer1.tag<=0 then timer1.enable=false unload me main.show end sub由于机器没有装VB,是想着写的,你调试一下吧,大致代码就是这样。
为了显示splash screen, 你先在工程-》工程属性-》通用选项卡中的启动对象里选择Sub Main,然后在Main里这样写:Private Sub Main() Dim PauseTime As Single, Start As Single ' Show the splash screen. frmSplash.Show ' 等候2秒. PauseTime = 2 ' Set duration. '停2秒' Start = Timer ' Set start time. Do While Timer < Start + PauseTime DoEvents ' Yield to other processes. Loop ' Show the main form and unload the splash screen. frmMain.Show Unload frmSplash End Sub 或者用2楼的方法
timer1.tag=timer1.tage-1
if timer1.tag<=0 then
timer1.enable=false
unload me
main.show
end sub由于机器没有装VB,是想着写的,你调试一下吧,大致代码就是这样。
Dim PauseTime As Single, Start As Single ' Show the splash screen.
frmSplash.Show ' 等候2秒.
PauseTime = 2 ' Set duration. '停2秒'
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop ' Show the main form and unload the splash screen.
frmMain.Show
Unload frmSplash
End Sub
或者用2楼的方法