KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Programmatically hiding the splash screen
PRODUCT: 4D | VERSION: 14.3 | PLATFORM: Mac & Win
Published On: May 8, 2015

Here is some sample code that can be used to hide all windows that are running in the application process.

// begin 4d code
ARRAY LONGINT($alwindows;0)

// get list of window reference ids
WINDOW LIST($alwindows)

// check the number of windows found
$windows:=Size of array($alwindows)

// did we find any windows?
If ($windows>0)

    // loop through the windows found
   For ($a;1;$windows)

       // check if window belongs to process 1
      If (Window process($alwindows{$a})=1)

          // hide window if belonging to process 1
         HIDE WINDOW($alwindows{$a})
      End if
   End for
End if
// end 4d code


Then to bring it back you can either use the same winRef value that you just passed to HIDE WINDOW with the SHOW WINDOW command or you can use a single line of code like this to show all of the windows for that process

SHOW PROCESS(1)