Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top Level Form on Top

Status
Not open for further replies.

pthalacker

Programmer
Aug 30, 2004
150
I have never used a top-level form before, but I just deployed a little applet in one. If there are any open windows on the desktop when it runs, it comes up in back of them. How do I make it appear on top of other open windows?

pamela
 
Hi Pamela,

The way I usually do this is like so:

Code:
DECLARE INTEGER SetForegroundWindow ;
  IN User32.DLL INTEGER nHandle
SetForgroundWindow(THISFORM.HWnd)

There might be an easier way, but the above is pretty reliable.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
You could also set the AlwaysOnTop property of the form to true.

Ed
 
Thanks, Mike. It seems like the Fox team would have created a native way to do that. But whatever works.

pamela
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top