Keeping focus on Progress Window

tthorp

New Member
<div align="Left"><font size="2" face="Arial" color="#000000"> Is there a way you can keep a Progress window the active window ? The idea being, that I want to force the user to press a button within the Progress app to close it, while not giving the user the choice to use another application in the meantime - like a disclaimer notice.</font></div>
 

Chris Kelleher

Administrator
Staff member
<div align="Left"><font size="2" face="Arial" color="#000000"> You can force a Progress window to stay-on-top of all other windows fairly easily with the following code:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
DEFINE VARIABLE result-code AS INTEGER NO-UNDO.

/* Make the CURRENT-WINDOW topmost. */
VIEW CURRENT-WINDOW.

RUN adecomm/_topmost.p
(INPUT CURRENT-WINDOW:HWND, /* Pass the HWND */
INPUT yes, /* YES - Topmost */
/* NO - Normal */
OUTPUT result-code). /* OK - non-zero */

/* Show the result code */
MESSAGE "Result Code =" result-code VIEW-AS ALERT-BOX.
[/code]

Hope this helps,

-Chris</font></div>

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 
Top