![]()
The graphic above shows an example of emulating the look of the standard Windows XP form, on a computer that is not running the XP operating system. This is part of a project I am working on to create psuedo-theme forms. The forms are saved as a project file, and in order to use them, the project file needs only to be opened and then saved to a new directory before any changes are made.
There are a number of steps required to achieve this effect. First the standard windows caption must be removed from the form. The code for this is included in the FormCreate procedure. Next the window region must be changed from a standard square to a rounded rectangle (the code is included in the procedure SetWindowsRegion). Because the form no longer has a caption, it is neccesary to intercept mouse down events on the form, and then send a message that will fool the operating system into thinking that the mouse has come down on the now nonexistent caption. This allows the form to be moved as though it still had a caption. The two lines of code that accomplish this are in the mouse down event code for the form.
The XP buttons in the upper right corner were emulated using bitmaps and standard Bitbtns. The menu bar has been emulated using a clickable label linked to a standard pop up menu. (There are components around that implement menus with the XP look and it is also possible to implement 'owner draw' procedures to override the standard slate grey pop up menus). The 'flat button' look on an XP has been emulated with a panel, with no beveling, which holds a bitmap which contains the button shape (the back arrow above). When the mouse down event occurs on the image, the beveling on the panel is to set to BevelInner -> Lowered, which creates the impression that the button has been depressed. When the mouse up event occurs on the image, the beveling is reset to none, returning the simulated button to the flat look. There are also a number of interesting components around that implement such things as colored buttons, or various components without the slate grey scrollbars and so on, which would help to complete the psuedo-XP look.
The project also includes some gradient shading code that gives the caption a 3D appearance. The link to the code is found in the ResizeForm procedure, and is currently commented out, since it is not yet working properly when the form is resized (you can take a look at it, and perhaps do some tinkering to get it to respond properly. The shading code is required to give that 3 dimensional look you so often see on XP look windows.)
The code is available as a Delphi 5 project file -> simxp.zip 23 KB
A Unified Field Theory
![]()
The Unified Field Theory
is also available as a zip file -> unified.zip
Introduction :The Pioneer Effect and the New Physics. A brief description of the new physics required to explain the 'Pioneer Effect', which is the constant deceleration of space craft as they fly through space.

