At this point, your form is complete. The next step is to write code to load the form from the program. Loading a form to display is done using the load statement. The load statement has three parameters.
● The first parameter is the form variable, which is used to hold the form object. The variable's type name should have the form name as appears below the Forms submodule.
● The second parameter is optional and indicates whether the form is created using modal or modeless modes. When using modal mode, which is the default, the load statement does not return to the caller until the form is unloaded. The form may be unloaded either by using the unload statement or when the user clicks the X button in the form title bar (if available). Modeless form returns immediately to the caller and the form runs in parallel to the code running after the load statement.
● The third and optional parameter is the form's parent window handle. A window handle is a 32-bit number used to uniquely identify the window in the current process. Each form has a handle that can be retrieved using the hWnd property. Passing 0 as a handle (or omitting the argument) uses the Windows desktop window. Forms created are always displayed on top of their parent. Additionally, when the parent is destroyed, the form is also destroyed. When a form is created using modal mode, the parent is disabled after the form is created and enabled and is activated as the form closes.