One program with two active window

cybvek

New Member
Hi!

Can I create two active windows in one program? One is the main window, and the another is an information window which fields will be updated by a main window's trigger. If I can, then how?

Regards,

Viktor
 
I don't know if it can help, but you can run procedure from one window to another one.

Example:

Your first window run the second window, sending the handle in parameter :

1ST-WINDOW.W
---------------------
.
.
RUN 2nD-WINDOW.W (INPUT THIS-PROCEDURE).
.
.
PROCEDURE Proc_name_in_1st_window:

DEFINE INPUT PARAMETER ip_param AS CHAR.
.
.
your code here
.
.

END PROCEDURE.



Now you can control your procedure in 1ST-WINDOW from the second window :


2nd-WINDOW.W
---------------------

DEFINE INPUT PARAMETER Win_name AS HANDLE NO-UNDO.



ON (Any_trigger_needed) DO:

IF VALID-HANDLE (Win_Name) THEN RUN Proc_name_in_1st_window IN Win_Name (your_parameter_here).

END.




In this example it means that the main window is the 2nd-Window, but you need to launch the 1st-window first and then launch the 2nd one.
 
Hi Viktor,

another way to solve this is to run the second window persistent and setting it's handle.

In Window1: RUN window2.w PERSISTENT SET WindowHandle.

From now on you can call procedures in window2 like:
RUN UpdateScreen in WindowHandle (parameters)
 

cybvek

New Member
Thanks, that's it what I want!

Originally posted by Henri de Vos
Hi Viktor,

another way to solve this is to run the second window persistent and setting it's handle.

In Window1: RUN window2.w PERSISTENT SET WindowHandle.

From now on you can call procedures in window2 like:
RUN UpdateScreen in WindowHandle (parameters)
 
Top