4D 2004 now gives the flexibility of altering the preferences in a compiled database. What makes this possible is the OPEN 4D PREFERENCES command.
OPEN 4D PREFERENCES (selector)
Parameter Type Description
selector string -> Key designating a theme or page or a group of parameters in the preferences dialog.
Calling this command will simply bring up the same window as seen in the design mode when selecting preferences from the Edit menu.
Here are some examples:
-Open preferences on the first page
OPEN 4D PREFERENCES ("/")
-Open the "shortcuts" page of the "Application" theme
OPEN 4D PREFERENCES ("/Application/Shortcuts")
-Open the "Form Editor" page of the "Design Mode" theme:
OPEN 4D PREFERENCES ("Default Display")
If the requested element passed into the command is found and opened successfully, the system OK variable returns a 1, otherwise it returns a 0.