我想你是要设置窗体在最前面是的么?api实现
SetWindowPos SplashForm.hwnd, 0, SplashForm.Left / Screen.TwipsPerPixelX, _
                  SplashForm.Top / Screen.TwipsPerPixelY, SplashForm.Width / Screen.TwipsPerPixelX, _
                  SplashForm.Height / Screen.TwipsPerPixelY, &H40

解决方案 »

  1.   

    Option ExplicitPrivate 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
       
    Const SWP_NOSIZE = &H1
    Const SWP_NOMOVE = &H2
    Const SWP_NOACTIVATE = &H10
    Const HWND_TOPMOST = -1
    Const HWND_NOTOPMOST = -2
    Const SWP_SHOWWINDOW = &H40Private Sub Command4_Click()
        Hide
    End SubPrivate Sub Form_Load()
     '使 窗 口 Always On Top用
        SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
    End Sub热键 form1.show