Click to See Complete Forum and Search --> : Form Always on top?


ilynx
October 23rd, 2001, 03:05 AM
how do i put a form always on top of the other??? tnx.

Clearcode
October 23rd, 2001, 03:12 AM
See http://63.236.73.79/cgi-bin/bbs/wt/showpost.pl?Board=vb&Number=64611&page=0&view=collapsed&sb=5

HTH,

-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.

Vikranth
October 23rd, 2001, 05:04 AM
Hi,

Use this for always on top of the other...


form1.zorder 0




OR

Use this "form1.show vbModal" for top most window.

OR

Use this API to make top most window.


private 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

Const HWND_TOPMOST = -1

SetWindowPos form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, 2 Or 1





Thanks,
Vikranth.