<HTML><HEAD>
<TITLE>XP Menu</TITLE>
<META content="text/html; charset=Windows-1252" http-equiv=Content-Type>
<style>
A {
color : #008000;
text-decoration : none;
}
A:Visited {
color : #800000;
}
A:Active {}
A:Hover {
color : #FF8000;
text-decoration : underline;
}
TABLE {
font-size : x-small;
}
TD {
background-color : #f7ede5;
vertical-align:Top;
}
Body {
font-family : Verdana, Tahoma, Arial, Helvetica, Geneva, Sans-Serif;
font-size : x-small;
background-color : #f7ede5;
}
</style>
<META content="RR" name=GENERATOR></HEAD>
<BODY>
<CENTER>
<TABLE border=0 cellSpacing=4>
<TBODY>
<TR>
<TD align=middle width=200>
<P align=left> </P></TD>
<TD vAlign=top width=450>
<h2 align=left><font size=7>XP
Menu </font></h2>
<P class=sidenote><A href="mailto:shagrouni@hotmail.com" >Khaled Shagrouni</A>
, October 5, 2002</P></TD></TR>
<TR>
<TD vAlign=top width=200>
<p align=center><br> </p>
<p align=left> </p>
<P align=center></P>
<P> </P>
<P></P>
<div align=center> </div>
<P align=center> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P></TD>
<TD vAlign=top width=450>
<p align=right>(Free with source) D4 D5 D6 CB5
CB6</p>
<p><font size=4>XP</font> Menu
is a none-visual component that changes the visual aspects of
menus, toolbars and many other controls to nearly the same look
and feel of MS Office XP. No code required, you do not have to reconstruct
menus or toolbars using controls other than those shipped with Delphi.
</p>
<p align=center><IMG alt="" id=IMG2 src="xpmenu.gif" ></p>
<p align=left> </p>
<p align=center><IMG alt="" src="xpm2.gif" ></p>
<p><BR></p>
<p> </p>
<hr SIZE=1 width="100%">
<p> </p>
<p>This component is FREEWARE with source code. I
still hold the copyright, but you can use it for whatever you like:
freeware, shareware or commercial software. If you have any ideas for
improvement or bug reports, don't hesitate to <A href="mailto:shagrouni@hotmail.com" ><font size=1
>e-mail me</font></A> <shagrouni@HOTMAIL.COM
>(Please state the XPMenu version and OS information),
an example will be appreciated. </p>
<p>
<hr SIZE=1 width="100%">
<p> </p>
<p><strong><a name=#Installation
><strong
>Installation</strong></a></strong></p>
<ul>
<li>A. Unzip the files: XPMENU.PAS and XPMENU.DCR
Into the same directory.
<li>B. From Delphi menu, Select File| New: Package.
<li>C. Press Add, and browse to add the unit
XPMENU.PAS.
<li>D. Press Install.
<li>E. The component is now installed in a new 'XP'
page.
<li>F. Save the package.</li></ul>
<p>If you have a previous version installed:</p>
<ul>
<li>Replace the old files (xpmenu.pas and
xpmenu.dcr) with the new one, open the package and recompile.
<li>If you encounter any problems remove all the
compiled units .dcu, .bpl, .dcp (try to locate them also in 'C:\Program
Files\Borland\DelphiX\Projects\Bpl' and 'C:\Program
Files\Borland\DelphiX\lib'), then install pre-compiled units again.
</li></ul>
<hr SIZE=1 width="100%">
<p> </p>
<p></p>
<p><strong><a name=#notes
><strong>Notes on
proprties</strong></a></strong></p>
<p><font color=navy
>Active</font> property: To activate/deactivate
xpMenu, also, set this property to <em
>False</em> then to <em>True</em>
when new items added at run time.</p>
<p><font color=navy
>AutoDetect</font> property: Set this property to
<em>True </em>to force xpMenu to include new added
items automatically.</p>
<p align=left><font color=navy
>UseSystemColors</font> property: The global
windows color scheme will be used, setting this property to true will
override other color related properties.</p>
<p><font color=navy
>OverrideOwnerDraw</font> property: By default,
xpMenu will not affect menu items that has owner draw handler assigned
(any code in <em>OnDrawItem</em> event). To override
any custom draw set this property to true. <font color=navy
></font></p>
<p><font color=navy
>Gradient</font> property: <em
>IconBackcolor</em> will be used as a gradient color
for the entire menu, <em>Color</em> property wil be
ignored.</p>
<p align=left><font color=navy
>FlatMenu</font> property: To turn
menu's border to flat (drop-down and pop-up menu). Any way, a flat
effect will not appear until a menu item is selected.</p>
<p align=left><font color=navy
>Form</font> property: The default is the
host form, if you want to target a different form other than the one
hosting the component; set <em>Form</em> property to
that form.</p>
<p align=left><font color=navy
>XPControls</font> property: Specifies which control
types affected by xpMenu. To prevent xpMenu from drawing a certain
control; set the control's Tag property value to 999.</p>
<p align=left><font color=navy
>XPContainers</font> property: Determine whether the
Controls hosted by the specifies containers are affected by xpMenu.<br
></p>
<p align=left><font color=navy
>GrayLevel</font> property: To control image appearance
in disabled items. </p>
<hr SIZE=1 width="100%">
<p> </p>
<p align=left></p>
<p><font color=navy
>ImageLists</font>:<br>For
toolbars only ImageList assigned to <em>Images</em>
property is used; xpMenu automatically generate dim and grayed images for
non-hot and disabled items.</p>
<p><font color=navy>Buttons with
tbsDivider style</font>:<br>xpMenu cannot draw
toolbar buttons with <em>tbsDivider</em> style,
Windows override any owner draw for this style (I am using Win 98). To
work around this, set the button style to tbsSeparator and set its <em
>Tag</em> property to none zero value.</p>
<p><font color=navy>Creation
order</font>:<br>Make sure that the creation order of
TXPMenu comes after any menu or toolbar component. To change the creation
order, choose Edit | Creation Order from Delphi menu to open the Creation
Order dialog box.<br> <br
>
<hr SIZE=1 width="100%">
<p> </p>
<p></p>
<p><strong><a name=#KnownIssues
><strong>Known
issues</strong></a></strong></p>
<ul>
<li>Toolbar doesn't supported in Delphi
4. <br><br>
<li>In Delphi 6, XPMenu doesn't recognize buttons
populated by Toolbar.Menu property, you need to reset Active
property to true at run time. <br><br
>
<li>In menu toolbar an Imagelist must be assigned
to the MainMenu. <br>A fix suggested by Liyang <A href="mailto:liyang@guangdainfo.com" >liyang@guangdainfo.com</A>
to Delphi's comtrls.pas, line 18758 : <pre><strong>function</strong> TToolBar.CheckMenuDropdown(Button: TToolButton):<br> Boolean;
.............
<strong>if</strong> ParentMenu <> <strong>nil then</strong>
<font color=#663300><strong>begin</strong></font>
FTempMenu.BiDiMode := ParentMenu.BiDiMode;
<font color=#663300> FTempM