At 10:56 AM 12/5/2011 -0500, Kent Belan wrote:
...
>The new EXE starts behind the application.
...
>I used to use this code in the main forms Init method:
>
>Declare integer SetForegroundWindow in User32.dll Integer
>SetForegroundWindow(this.HWnd)
...

Here is the code I usually use (copied/pasted out of misc method code):

DECLARE INTEGER BringWindowToTop IN Win32API INTEGER hWnd
SET LIBRARY TO FOXTOOLS.FLL ADDITIVE
nTmpHWnd = MainHwnd()  &&this function is in foxtools.fll
BringWindowToTop(nTmpHWnd)

This code gets put into your "main" prg file (aka the entrypoint into your 
.exe). I put it just before my READ EVENTS statement.

  If you have a "form" set as your "main", I'd suggest putting this code in 
the Activate Event.

-Charlie


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to