1.10+ Release Notes Overview

tPack Enhancements

Visual Components (TControls)

Non-Visual components (TComponents)


Forms, Components and built-in Command-Line options

I'm breaking out to command-line options supported by the tPack base forms and components into this section because they inter-relate and should be discussed together.

The Application base form respects all windows startup options including the SW_HIDE option. Through the commandline you can control if you want the form to start minimized (/Min or /Minimized) or if you want the form to be hidden on startup (/Hide).

The Tray level which introduces the support for a tray icon respects the /Tray and /NoTray switches. To make a tray enabled form that starts in the tray, make sure the TrayIcon.Enabled property is set to true. If it's true, your exe will start in the tray without the form visible (Start the app with /NoTray to make it act normally). Conversely, if the default is False, the form will act normally and only go into the tray when you provide the /Tray switch.

Regardless of how the app went into the tray, you might still want your app to start with the main window visible. For that case you will need to set the TrayIcon.RestoreOnLoad property to true or supply the /Restore switch on the command-line. An application compiled with the RestoreOnLoad property set to true will respect the /Min and /Minimized switches. While this sounds and is confusing, the idea is to provide you with the full matrix of tray/non-tray, restored/park, minimized/normal/hidden possibilities through a few properties and commandline settings.

The /Hide switch overrides the /Tray switch and the TrayIcon.Enabled property. e.g. if /Hide is supplied to the exe it will simply be invisible for as long as it is not explicitly restored. Use UcWinApi's ActivateWindow function like this ActivateWindow('TApplication','<ExeNameNoExtension>'); to make an application that has been started invisible visible again. A Mainform started with /Hide will also hide itself again when you minimize it after restoring. To stop this behaviour simply change Delphi's CmdShow global variable to something other than 0, or set Application.OnMinimize to nil.

As if this was not enough, the ucOnce unit has been extended to offer /Quit functionality. from the commandline, call your app a second time with /Quit, and the first instance will shut down.

See the WebHub Class Library notes for information about webhub specific switches.

Utility code

Name Changes

tPack Naming Conventions