How To Collapse A Form

Table of contents:

How To Collapse A Form
How To Collapse A Form

Video: How To Collapse A Form

Video: How To Collapse A Form
Video: How to Create an Animated Accordion/Collapsible Content - HTML, CSS & JavaScript - Website Tutorial 2024, December
Anonim

In order for the application in its open form not to occupy a whole line, it must be hidden in the system tray. To do this, the program form should be minimized to a special place located in the lower right corner of the screen.

How to collapse a form
How to collapse a form

It is necessary

Computer with modern software. Access to the Internet

Instructions

Step 1

In order for the application to collapse to the tray when unnecessary and not take up space in the bottom line, you need to create a HIDE button or any other button in its dialog box, which will indicate that the form is collapsed.

Step 2

To create a button, you need to write a script in which the conditions for closing the window are written, for example, like this: "e. Cancel = false", since "e. Cancel = true" completely closes the program. This will allow the form to collapse to tray when you click on the cross to close the application.

Step 3

Test the script. To do this, start the application and click on the SysTray button, which will lead to the appearance of an icon. After pressing the HIDE button, the window disappears and the icon appears in the tray.

Step 4

For the form window to appear, you need to click on the icon - and the window will reappear.

Step 5

To minimize the form, the window flags must be set with minimal code.

Recommended: