|
-
Sep 1st, 2000, 09:07 PM
#1
I'm trying to make an intro form like in the progs of the MS Office Suite. But the intro form is sent to the back.
How do i get it to show up on top instead??
-
Sep 1st, 2000, 09:18 PM
#2
or you can do this
Code:
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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
Private Sub Form_Load()
Call SetWindowPos(Me.hWnd, (-1), 0,0,0,0, 3)
End Sub
[Edited by denniswrenn on 09-01-2000 at 10:20 PM]
-
Sep 1st, 2000, 09:20 PM
#3
Use the SetWindowPos API:
Put this in a module:
Code:
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (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
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const HWND_TOPMOST = -1
Public Sub MakeAlwaysOnTop(ByVal hWindow As Long)
SetWindowPos hWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
And this in the Form_Load() event:
Code:
Private Sub Form_Load()
MakeAlwaysOnTop Me.hWnd
End Sub
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|