KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Running a Form from the Form Editor runs it in Application Process
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: July 11, 2022

The 4D Form Editor has a Play Button that allows a Form to be executed to see how it will look and perform:


When this button is used, the Form will be executed in the main Application Process:


While this is useful to quickly test and troubleshoot the form, it is always best to test the form in its own process.
If the Form is ran in the application process, some variables, such as process variables will not clear if the form is closed and reopened in the same process.
The menu bar, if not set will show designer menus.
If the Form locks up somehow, it can make it difficult to access the designer features to attempt to close the form requiring a restart.

For example, with the Runtime Explorer, it is not possible to interact with the Application process:


If the form is in a new process, that process can be interacted with and even aborted:


Not much code is needed to open a form, below is a simple example for a form named "Form1":

$win:=Open form window("Form1")
DIALOG("Form1")
CLOSE WINDOW($win)

This method can then be executed as a new process, opening the form in a new process separate from the Application Process.