Everyone knows the role of Windows screensaver, and the new screen saver is becoming more and more beautiful. If you right-click on Win98 's Desktop menu to select Properties, the Display settings screen pops up, and a tab is set up for the screensaver.
On the screen of the page, there is a display pattern, and if you choose Win98 's screen saver, this screensaver will run automatically on this small ' monitor '. You can see the effect directly. This feature greatly facilitates the selection of screen saver, which is Win98 's new interface to the screen saver: Preview function.
This interface is supported by most of the new screen saver programs currently available.
Screen saver from its birth at that time, at the same time can only run one, not multiple simultaneous operation, however, preview the introduction of the interface, so that the simultaneous preview of multiple screen saver is possible, this article will introduce to readers how to use Delphi to develop such a program.
1. Screen Saver Preview Interface
The use of the screen Saver preview interface is simple, which is achieved by passing command-line arguments to the screen saver, which is formatted as:
screensaver.exe/p#####
which is #为一个有效的窗口句柄的10进制表示.
This window we can call the preview window.
In fact, the screen saver that supports the preview interface creates its own window as a child window of the preview window to implement the preview function.
2. Picture layout
Our window of this program is divided into 3 parts, for the inverted ' product ' glyph, the upper left section lists all available screen savers, and the upper right section lists all the screen savers that are previewed, of course, the preview window below.
With Delphi implementation, first in the form to put 2 tpanel components, Panel1 alignment for the top alignment, Panel2 for the full user area, and then put 1 tfilelistbox components and a tlistbox component in the Panel1, FileListBox1 left-aligned, ListBox1 full user area.
In this way, FileListBox1 is the screen saver list, ListBox1 is the preview list, Panel2 is the preview window.