ZoomFromTray Method

This method causes the window referred to by hWnd to be zoomed (restored) from the system tray and shown.

Note: before calling this method, you need to both hide the designated window and place it where you want it to be after zooming.

Syntax

csSysTray[(index)].ZoomFromTray hWnd

The ZoomFromTray 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 from the System Tray)

Form1.Hide 'make sure the form is hidden
Form1.Move 100,100 'move it where you want it to end up
csSysTray1.ZoomFromTray 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 ZoomToTray 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.