VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Stay On Top Only One Line of Code After Declarations!!!

by Oompa L. Standwiggalman (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Sat 4th November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Stay On Top Only One Line of Code After Declarations!!!

API Declarations


Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOMOVE = &H2
Public Const OOMPS = SWP_NOSIZE Or SWP_NOMOVE


Rate Stay On Top Only One Line of Code After Declarations!!!



'Ex. (Form1.hwnd)
'Put this code in form load
'Here is the Code to Keep Your form on top
Call SetWindowPos(Formname.hwnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, OOMPS)

'And Here is the Code to make your form not on top anymore

Call SetWindowPos(Formname.hwnd, HWND_NOTOPMOST, 0&, 0&, 0&, 0&, OOMPS)

Download this snippet    Add to My Saved Code

Stay On Top Only One Line of Code After Declarations!!! Comments

No comments have been posted about Stay On Top Only One Line of Code After Declarations!!!. Why not be the first to post a comment about Stay On Top Only One Line of Code After Declarations!!!.

Post your comment

Subject:
Message:
0/1000 characters