Is there a way to make a vb app always stay on top, regardless of the active window. An example would be the task manager window.
Printable View
Is there a way to make a vb app always stay on top, regardless of the active window. An example would be the task manager window.
make a command button and place this code into form:
private Declare Function SetWindowPos Lib "user32" (byval h%, byval hb%, byval X%, byval Y%, byval cx%, byval cy%, byval F%) as Integer
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const flags = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
private Sub Command1_Click()
SetWindowPos me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, flags
End Sub
Good luck!