ZoomToTray Method
This method causes the window referred to by hWnd to be hidden and zoomed (maximized) from the system tray.
Note: This method will not change the WindowState property or location of your form; it will simply hide it after minimizing it and will not move it.
Syntax
csSysTray[(index)].ZoomToTray hWnd
The ZoomToTray method syntax has these parts:
Part | Description |
csSysTray | The SysTray control you are working with, or a control array of SysTray controls. |
hWnd | A handle to the form you want zoomed. (ex: Form1.hWnd) |
Examples
Example 1 (Zooming a form to the System Tray)
csSysTray1.ZoomToTray Form1.hWnd 'call the "zooming" animation.
Remarks
You probably want to set the ShowInTaskBar property of the forms you are watching to False at design time. See also the ZoomFromTray method.
Also, the Microsoft Windows operating environment identifies each form and control in
an application by assigning it a handle, or hWnd. The hWnd property is used with Windows
API calls. Many Windows operating environment functions require the hWnd of the active
window as an argument.
Note Because the value of this property can change while a program is
running, never store the hWnd value in a variable.