VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple Function to make a form stay ontop of all other forms

by Bullwinkle (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 24th February 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple Function to make a form stay ontop of all other forms

Rate Simple Function to make a form stay ontop of all other forms



Const SWP_NOMOVE& = &H2
Const SWP_NOSIZE& = &H1
Dim lFlags As Long
Dim lStay As Long

lFlags = SWP_NOSIZE Or SWP_NOMOVE

If Ontop = True Then
SetWindowPos hwnd, -1, 0, 0, 0, 0, lFlags
Else
SetWindowPos hwnd, -2, 0, 0, 0, 0, lFlags
End If
End Function

'Example ToggleOntop (True)
'Example ToggleOntop (False)

Download this snippet    Add to My Saved Code

Simple Function to make a form stay ontop of all other forms Comments

No comments have been posted about Simple Function to make a form stay ontop of all other forms. Why not be the first to post a comment about Simple Function to make a form stay ontop of all other forms.

Post your comment

Subject:
Message:
0/1000 characters