|
-
Jan 31st, 2002, 01:29 PM
#1
Thread Starter
Junior Member
Help please....
I know this isn't the forum, but I couldn't get an answer.
I want to delay the unloading or hiding of my modal Copyright screen until after the main form is shown. Any ideas on how to 'trick' it?
-
Jan 31st, 2002, 01:33 PM
#2
Make sure your copywrite screen is always on top, and don't issue an unload command for it until the main form is fully loaded.
-
Jan 31st, 2002, 02:23 PM
#3
Like this:
VB Code:
Private 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
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Function SetTopMostWindow(hwnd As Long, Topmost As Boolean) As Long
On Error Goto ErrRtn
If (Topmost) Then
SetTopMostWindow = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Else
SetTopMostWindow = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
SetTopMostWindow = False
End If
Exit Function
ErrRtn:
MsgBox "Error in SetTopMostWindow " & Err & " " & Error, vbExclamation + vbOKCancel
End Function
Private Sub Form_Load()
'To Make Always On Top
SetTopMostWindow Me.hwnd, TRUE
End Sub
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
|