我想要一个这样的程序我想用VB写个欢迎使用本软件的东东  屏幕中间有一个窗体 窗体背后 有一张全屏的图片,要在屏幕的最顶端  数秒后窗体和图片都消失  这个程序的作用 是我在屏幕弹出窗体和图片时我要加载一个程序 屏幕中的窗体的图片要盖住加载程序的过程  程序加载完后 屏幕中的窗体和图片都消失 (大约2秒)

解决方案 »

  1.   

    Public fMainForm As frmMain
    Sub Main()
        '加载展示屏幕
        frmSplash.Show
        frmSplash.Refresh
          
        ...你可以加载一个无边框的窗体,当他最大到全屏幕,...        '加载主程序
        Set fMainForm = New frmMain
        Load fMainForm
        
        '去掉展示屏幕
        Unload frmSplash
        fMainForm.Show
    End Sub
      

  2.   

    Declare Function SetWindowPos Lib "user32" _
    (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, _
    ByVal cx%,ByVal cy%,ByVal f%) As Integer 
    Global Const SWP_NOMOVE = 2 
    Global Const SWP_NOSIZE = 1 
    Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE 
    Global Const HWND_TOPMOST = -1 
    Global Const HWND_NOTOPMOST = -2                  'To set Form1 as a TopMost form, do the following: res% = SetWindowPos (Form1.hWnd, HWND_TOPMOST, _
    0, 0, 0, 0, FLAGS) 
    'if res%=0, there is an error                  
    'To turn off topmost (make the form act normal again): 
    res% = SetWindowPos (Form1.hWnd, HWND_NOTOPMOST, _
    0, 0, 0, 0, FLAGS)
      

  3.   

    Option Explicit'主窗口加载
    Private Sub Form_Load()
        frmSplash.WindowState = vbMaximized
        frmSplash.Show  '显示展示屏幕
        DoEvents
        '比较费时的处理程序或过程
        Dim i As Long, d As Double
        
        For i = 1 To 10000000
            d = d + 1
        Next
        
        Unload frmSplash '关闭展示屏幕
    End Sub
      

  4.   

    使用API--SetWindowPosSetWindowPos Me.hWnd,HWND_TOPMOST,0,0,0,SWP_NOSIZE Or SWP_NOMOVE
      

  5.   

    For i=1 to 1000000000这样的软件我第一时间SEHLL+DEL
      

  6.   

    楼上都说了,蹭分.....风尘鸟的让你的frm保持在屏幕最上层,洪根老大的能让程序启动完毕后自动消失展示屏幕.如果想要展示固定的一段时间的话,还是用timer控件好(^_^)
      

  7.   

    SetWindowPos (Form1.hWnd, HWND_TOPMOST,0, 0, 0, 0, FLAGS)