if ( this.mlBringBackOnTop ) external procedure mainhwnd SET LIBRARY TO "FOXTOOLS.FLL" additive local lnHWND lnHWND = mainhwnd() if ( _screen.WindowState = 1 ) * this window is iconized so first we need to restore it * Use the ShowWindow API call because we don't know whether to set WindowState to 0 or 2 * the API call does return the window to whatever state it was before it was iconized declare integer ShowWindow in WIN32API integer, integer #define SW_RESTORE 9 ShowWindow( lnHWND, SW_RESTORE ) endif DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER SetForegroundWindow( lnHWND ) endif>I am using WIN32API to find out if the application is all ready loaded then using ShowWindow to show the window. I get inconsistant results on showing the window. Sometimes it is shown and sometimes it is only partialy painted. I have tried the following with 3, 5 and 6:
>LPARAMETER lnHWND
>
>DECLARE INTEGER ShowWindow IN Win32API;
> INTEGER hwnd, INTEGER dflag
>
>= ShowWindow(lnHWND, 3)
>
><\PRE>
>
>Does anyone know the syntax for ShowWindow to maximize the window and bring it to the top?
>
>Thanks