Popup or maximize another application from Toolbar

Chris Kelleher

Administrator
Staff member
We use:
<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
DEFINE VARIABLE xxintResult AS INTEGER NO-UNDO.
DEFINE VARIABLE xxIntWinHand AS INTEGER NO-UNDO.

PROCEDURE SetForegroundWindow EXTERNAL "USER32.DLL":
DEFINE INPUT PARAMETER xxIntWinHand AS LONG.
DEFINE RETURN PARAMETER xxintResult AS LONG.
END PROCEDURE.

PROCEDURE FindWindowA EXTERNAL "USER32.DLL": /* LONG = Pass Zero (0) for Null
*/
DEFINE INPUT PARAMETER intClassName AS CHARACTER.
DEFINE INPUT PARAMETER chrCaption AS LONG.
DEFINE RETURN PARAMETER intHandle AS LONG.
END PROCEDURE.

RUN FindWindowA (INPUT "XLMAIN", INPUT 0, OUTPUT xxIntWinHand).

IF xxIntWinHand NE 0 THEN
RUN SetForegroundWindow(INPUT xxIntWinHand, OUTPUT xxintResult).
[/code]
HTH.
Cc

At 12:20 PM 10/21/99 , Magnus Forssblad wrote:
>Hey,
>
>my problem is that I want to maximize another application (i.e) Excel from a
>progress-session.
>I found ShowWindow(handle,3). But how do I get the handle to the other
>application??
>
>Regards
>
>Magnus Forssblad
>ApolloResor
>Stockholm
>Sweden
>
 
Top