VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Make your form stay on top of other forms that stay on top (the easy way)

by Morpheous Dreams (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 6th June 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Make your form stay on top of other forms that stay on top (the easy way)

Rate Make your form stay on top of other forms that stay on top (the easy way)



'Put this in a module......
Private Declare Sub 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)

Sub OnTOp(frm As Form)
SetWindowPos frm.hwnd, -1, 0, 0, 0, 0, 3
End Sub
'............................................................
'Put a timer on a form and call it like

Private Sub Timer1_Timer()

'Timer1.Interval = 1
OnTOp Form1

End Sub
'Now your program stays on top of all programs

Download this snippet    Add to My Saved Code

Make your form stay on top of other forms that stay on top (the easy way) Comments

No comments have been posted about Make your form stay on top of other forms that stay on top (the easy way). Why not be the first to post a comment about Make your form stay on top of other forms that stay on top (the easy way).

Post your comment

Subject:
Message:
0/1000 characters