VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

A small bit of code to make your form stay on top

Kevin Nading  (1 Submission)   Custom Controls/Forms/Menus   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code will make your form stay on top of any other windows running, just like winamp stays on top.

Assumes
just make a new form and make a module and follow instructions below.. if you already have a form and or a module just add the code below to them

Side Effects
do not make a large form stay on top or you will not be able to see the other apps that are open

API Declarations
'put this stuff in your new module
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
Global Const conHwndTopmost = -1
Global Const conSwpNoActivate = &H10
Global Const conSwpShowWindow = &H40

Rate A small bit of code to make your form stay on top (9(9 Vote))
A small bit of code to make your form stay on top.bas

A small bit of code to make your form stay on top Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters