______________________________________

MDI Wallpaper Delphi Component
version 4.0
by Robert Rossmair
______________________________________




Description
Compatibility
Current file versions
Recent changes
History
Installation
Help file installation
File list
Copying policy
New versions


Description

TMDIWallpaper is a background graphic component for MDI frame windows.
It has been written to be used especially with MDI frame windows (that is, forms with FormStyle set to fsMDIForm), but it will work with non-MDI forms, too.

Compatibilty

Delphi 2.0 / Delphi 3

Current file versions

MDIWallp unit: 4.0 (02-Jun-1999)
Demo project: 1.2 (02-Jun-1999)

What's new

Big transparent bitmaps caused form background painting to be awkwardly slow in earlier versions; a fact which successfully escaped my attention until recently, when the implementation of the GrayMapped property required some code redesign. This is fixed in version 4.
property GrayMapped: Boolean;
When GrayMapped is set to True and Picture.Graphic is a bitmap with 256 or less colors or a TGIFImage (GIFImage unit by Anders Melander et alii), all gray scale colors in the bitmap will be mapped to a "clBtnFace scale".
When GrayMapped is set to True and Picture.Graphic is a bitmap with more than 256 colors or another TGraphic descendant, all colors in Picture.Graphic will be mapped to a clBtnFace color gradation.
This is an substantially enhanced variant of a feature suggested by Harald Marschalek.
Note: This feature is not available if the unit is compiled using Delphi 2. Sorry...
property AutoSizeTile: Boolean;
property TileWidth: Integer;
property TileHeight: Integer;
The TileWidth and TileHeight properties allow to specify horizontal respectively vertical drawing offsets in tiling mode which are greater than the Picture dimensions. This can be useful especially with tranparent graphics. When AutoSizeTile is set to True, the tile size defaults to the Picture dimensions.

Recent changes

Version 3.1 (03-Feb-1999):
 
Fixes bug which prevented the background from being updated when the Picture property is set to nil.
Adds the Enabled property.
Version 3.01 (13-Aug-1998):
 
As a goodie for D2 users, TMDIWallpaper sets the proper (WS_EX_CLIENTEDGE) border style for the MDI client window.
Version 3.0 (06-Aug-98):
 
introduces Picture, Shift, ShiftMode and Info properties; the Picture property replaces the Bitmap property of prior component versions.
Some code sent to me by Kristoffer Henriksson pointed me to a way how to overcome the problems which caused me to remove the Mode property in V2.0.  Hence V3.0 has a Mode property again.
Includes a demo application demonstrating the use of the new properties Mode, Shift, ShiftMode and ZigZag.
Registers TGraphicEditor as component editor for TMDIWallpaper, thus changing the double-click behavior in design mode (but beware! There's a problem with Delphi 3, see below).

History

Version 2.1.1 (25-Jun-98):
Cosmetic changes
Version 2.1.0 (11-Jun-98):
Zigzag property implemented (using code by Fabio Cavicchio)
Version 2.0.0 (26-Apr-98):
This version fixes the bug that version 1.6 only claimed to fix... (versions < 2.0.0 will not redraw correctly if a MDI child window which has been moved partially out of view is scrolled in view again (unfortunately this hadn't been tested ever).
Note that I found the values for internal constants ScrollUnit and ScrollLineSize by experimenting, so there is no guarantee that they are valid under all circumstances. However, tests did not give any hints that they are not.
The Mode property has been removed.  The virtual desktop of a MDI frame window is best considered as infinite in size (you may move a MDI child to the left until it's almost completely outside the window, then scroll it in view, then again move it to the left and so forth...); therefore notions like 'top', 'left', 'center' are meaningless in this context.
The component now always works in a mode equivalent to Mode=wpTile in earlier versions.
Bug fix: Previous versions won't redraw correctly for scrollbar positions <> 0.
Version 1.5 (06-Mar-98): Version 1.4 (03-Mar-98):
Bug fix: Prior versions will not redraw correctly on form resize if Mode property not in [wpTile, wpTopLeft].
Version 1.3 (09-Dez-97):
Make it work with non-MDI windows by commenting out two lines in TMDIWallpaper.Create.
Minor fix.
Version 1.2 (28-Nov-97):
Added wpTopRight, wpBottomLeft, wpBottomRight.
Some fixes.
Version 1.1 (06-Nov-97):
added wpStretch
Version 1.0 (22-Oct-97):
First public release

Installation

Important hint: Since TMDIWallpaper's Bitmap property has been removed in version 3.0, you are advised to save to disk any bitmap data contained in any pre-3.0 version TMDIWallpaper components and not available otherwise before installing the new version! After having installed version 3.0 or greater, you can load them into the new Picture property.
I suggest to unpack the zip-file into a private directory. Then click on the Component|Install... (Delphi 2.0) respectively Component|Install Component... (Delphi 3) menu item to open the component installation dialog and proceed as usual.

Delphi 3 problem

When installing mdiwallp.pas under Delphi 3, you will experience a
File not found: 'LibConst.dcu'
error message.

There are two alternative work-arounds for this problem:

Help file installation

Basically, MDIWallp.hlp and CompInfo.hlp are Delphi 3 help files. That means that links into Delphi help files (e.g. to TComponent) won't work with Delphi 2.0. However, they include both A- and B-links and thus provide context-sensitive help for Delphi 2.0 as well as Delphi 3.

Delphi 2.0:

Delphi 3:

File List

 
File Description Copying policy
MDIWDemo.dpr demo app. project file 1
MDIWDemo.dof demo app. project options 1
MDIWMain.pas demo app. main unit 1
MDIWMain.dfm demo app. main form 1
MDIWChld.pas demo app. MDI child form unit 1
MDIWChld.dfm demo app. MDI child form 1
MDIWallp.pas Component unit 1
MDIWallp.dcr Component resource 1
MDIWallp.hlp Component help file 1
MDIWallp.kwf keyword file for MDIWallp.hlp 1
CopyrInf.pas auxiliary unit 1
CompInfo.pas auxiliary unit 1
CompInfo.dfm "Component Information" dialog 1
CompInfo.hlp help file for CompInfo 1
CompInfo.kwf Keyword file for CompInfo.hlp 1
mUrlLabel.pas auxiliary unit for CompInfo 2
mUrlLabel.dcr mUrlLabel resource file 2
mUrlLabel.res mUrlLabel resource file 2
RRColors.pas auxiliary unit 1
MDI Wallpaper package readme.htm this file 1

Copying policy

Copying policy 1 means:
Use, modification and distribution is allowed without limitation, warranty, or liability of any kind.
Copying policy 2 means:
These files are freeware copyright Ahto Tanner, Moon Software.

New versions of mdiwallp.zip

The most recent version of mdiwallp.zip is available at my WWW-homepage.



If you have any comments, bug reports etc., send me an email.

Last updated June 02, 1999.