如题,小弟在做一个简单的程序开发,首先是想word打开时所显示的一个小块页面,数秒之后隐藏,自动跳转到主程序中,不知道在vb 6.0 中如何实现,谢谢!

解决方案 »

  1.   

    打开时所显示的一个小块页面:添加一个无标题栏的窗体并设置为居中。设置窗体的背景为一张图片。在上面放一个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,是想着写的,你调试一下吧,大致代码就是这样。
      

  2.   

    你说的这个叫Splish,就是显示版权信息的窗口。在VB里面选择文件-新建-应用程序向导。然后一步一步走下去,有一步是你的程序需要哪些窗口,选上版权信息,最后完成,这样就可以得到一个这样的程序。等你看明白了,自己也会做了。
      

  3.   

    更正一下,这个叫Splash screen,但是中文叫啥我不知道,但是不叫“启动窗体”。
      

  4.   

    为了显示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楼的方法