Opening a Natural Dialog from a program

Is there a way to open a Natural Dialog, or more specifically a GUI popup window from a Natural program.

The Messagebox appears to be a GUI window and this can be run from a Natural program so I thought there might be a way to do this with other GUI windows.

Of course, the OPEN DIALOG statement does this for you :wink:

Can you give more details calling from a PROGRAM:
What do you use as PARENT parameter?
How do you get over the “NAT6157 Dialog called from non-gui environment”?

With 6.1 I know only the possibility calling via STACK TOP COMMAND.

You have to initiate your session with a dialog if you want to open a dialog with OPEN DIALOG. The initial dialog should call your starting program and then you can do everything you want to as a GUI context has been set up.

If you don’t mind leaving your current program you can use the stack command:


… and come back (old NAT1.x way to make loops)



[quote="Wilfried B

Hi, i do this with this instruction:

Run ‘Dialog Name’

works very nice… (not necesary parameters)

Thanks for all your help.

The OPEN DIALOG statement did not work for me – I get the 6157 error.

The STACK would certainly work but difficult in the application I have in mind.

The RUN statement – I will have to try this one – I had not thought of it.

I ultimately rewrote the Program as a Dialog but did not display any GUI screen – from there I was able to display the GUI popup window I had originally intended.

Thanks again.


Thanks Wilfried. That will be useful next time I have this problem. I am working on a legacy system so this will occur again.