Click to See Complete Forum and Search --> : Keeping the Window always on top


October 5th, 1999, 02:12 AM
HI all,

From Vb Application, i'm calling a form and keeping it always top of other forms by using the API Call
SetWindowPos(). But if i open any another application from windows start menu, the form which is being kept on top
is still remaining the top of the other application also............

How to keep it background which i open any other application ? Pls help me in this regard............

it's vary urgent pls..........


Thanks
Ramu

Lothar Haensler
October 5th, 1999, 04:05 AM
if you want your form to stay on top use the SetWindowPos API with the HWND_TOPMOST flag, as you already did.
If don't want that, you can always use the Form's ZOrder method to bring the form window to the foreground of the current app. Don't use SetWindowPos in this case.