📄 readme.html
字号:
<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="MSHTML 5.00.2919.6307" 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><font size=5>2.2</font></h2>
<P class=sidenote><A href="mailto:shagrouni@hotmail.com" >Khaled Shagrouni</A>
, April 29, 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). </p>
<p>
<hr size=1 width="100%">
<p> </p>
<p><strong><a name=#Installation
><strong
>Installation</strong></a></strong></p>
<ul>
<li> Unzip the files: XPMENU.PAS and XPMENU.DCR
Into the same directory.
<li> From Delphi menu, Select File| New: Package.
<li> Press Add, and browse to add the unit
XPMENU.PAS.
<li> Press Install.
<li> The component is now installed in a new 'XP'
page.
<li> 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.<br><font color=red
><em>Do
not set Active to False from within controls affected by
xpMenu. </em>See <A href="#caution" >Caution</A> below.</font></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.<br
><font color=red><em
>Do not change XPControls values from within controls
affected by xpMenu.</em></font></p>
<p align=left><font color=navy
>XPContainers</font> property: Determine whether the
Controls hosted by the specifies containers are affected by xpMenu.<br
><font color=red><em
>Do not change XPContainers values from within
controls affected by xpMenu.</em></font></p>
<p align=left><font color=navy
>GrayLevel</font> property: To control image
appearance in disabled items. <font color=navy
>DimLevel</font> property: </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.
<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.
<li>In menu toolbar an Imagelist must be assigned to the MainMenu.
<li>Edit box associated with UpDown control doesn't reflect the changing
value (Win98). To solve this; change the Ctl3D property to false.
<li>Window menu in MDI parent form and system menu are not
supported.</li></ul>
<p><font color=red><a name=#caution><font
color=red>Caution</font></a></font></p>
<ul>
<li>Deactivate XPMenu from within controls affected by xpMenu may cause
error, this can happen also when changing any vlue of XPControls and
XPContainers properies .
<li>Deactivate XPMenu from within menu item OnClick handle cause loosing
the drawing of the menu, to prevent this use Application.ProcessMessage
before changing Active property:<br><pre><font size=2><strong>procedure</strong> TForm1.mnuActivateXPClick(Sender: TObject); <br><strong>begin</strong><br> Application.ProcessMessages;<br> xpMenu1.Active := mnuActivateXP.Checked;<br><strong>end</strong>;</font></pre></li></ul>
<hr size=1 width="100%">
<p> </p>
<p><strong><a name=#tips><strong>Tips</strong></a></strong></p>
<p><font color=navy>How to create menu toolbar:</font><br> (Extracted
from Delphi Help - TToolButton.MenuItem) </p>
<ul>
<li>To create an "IE4-style" (Office-style) toolbar that corresponds to
an existing menu:
<li>1 Drop a ToolBar on the form and add a ToolButton for each top-level
menu item you wish to create.
<li>2 Set the MenuItem property of each ToolButton to correspond to the
top level menu items.
<li>3 Set the Grouped property of each ToolButton to True.
<li>4 Clear the MainMenu property of the Form (if it is
assigned)<br></li></ul>
<p><font color=navy>Images in toolbars and menus</font>: </p>
<p>To make an image transparent, be sure to fill the background with a
unique color-a color your image is not using. Also, make sure that the
color of the bottom leftmost pixel shown onscreen has the same background
color; xpMenu will use this pixel to determine the transparent color. </p>
<p><font color=navy>Edit box</font>: </p>
<p>Set the Ctl3D property to false, this eliminate the time consumed when
drawing edit box for the first time.
<p><a name=#history><b>History</b></p>
<p></A> </p>
<p>Apr 29, 2002, V2.2</p>
<ul>
<li>Some bug fixes.
<li><comanche@963.NET>Fixing Leftjustify allignmen in CheckBox and
RadioButton.</li></ul>
<p>Jan 10, 2002, V2.1</p>
<ul>
<li>Adding support for SpeedButton, PageScroller, Panel and
GroupBox.
<li>Enhancing controls appearanceEnhancing EditBox appearance.
<li>Support for HotImages and DisabledImages for Toolbar, kindly added
by <a href="mailto:sylvain2@pinksoft.co.za">Sylvain
Ntumba</a><sylvain2@PINKSOFT.CO.ZA>.
<li>Many Bug fixes.</li></ul>
<p>Dec 14, 2001, V2.0</p>
<ul>
<li>Supporting new controls, thanks to <a
href="mailto:domains@planetsymphony.com">Heath Provost</a> who made the
basic code to subclass and paint combobox. The controls supported so far
are: ComboBox, CustomEdit, CheckBox, RadioButton, Button, BitBtn and of
course, Toolbar and Menu.
<li>Disabled text in tool bar buttons is drawn correctly now.
<li>xpMenu can detect menus and toolbars inside Frame.
<li>DimLevel and GrayLevel properties added to control the appearance of
the bitmaps. (suggested by <a href="mailto:@">Warner</a> and <a
href="mailto:postmaster@imazzo.com">Enzo</a>)
<li>Drawing bitmaps assigned to menu items is improved. - Fixing some
problem caused by FlatMenu property.
<li>Active property behavior is changed, to enforce the component to
draw new added controls; it must be set to false first.
<li>Adding 8 pixels to top menu items for WinNT based systems.
(Suggested by <a href="http://www.neikeisoft.de">Niki Bugarcici</a>
and <a href="http://www.digitalwired.net">Brian Slack</a> )
<li>Fixing some drawing aspects.</li></ul>
<p>Nov 2, 2001, V1.506</p>
<ul>
<li>Changing the default color of menu bar.
<li> Changing Form property type to
TScrollingWinControl. (Suggested by <a
href="mailto:M.M.K@t-online.de">Michael Martin</a> .)</li></ul>
<p>Oct 7, 2001, V1.505</p>
<ul>
<li>Supporting ControlBar. Added by <a
href="mailto:michiel@iego-development.nl">Michiel van
Oudheusden</a>. </li></ul>
<p>Sept 5, 2001, V1.504</p>
<ul>
<li>Removing some problematic code lines in the procedure:
ToolBarDrawButton. This code causes unwanted effect on desktop
when activating the component at run time with form contains a
ToolBarButton with MenuItem.</li></ul>
<p>Sept 4, 2001 - V1.503</p>
<ul>
<li>Bug fixed.</li></ul>
<p>Sept 3, 2001 - V1.502</p>
<ul>
<li>Bugs fixed. </li></ul>
<p>Sept 1, 2001 - V1.501</p>
<ul>
<li>Passing beta stage.
<li>Some minor changes and bugs fixed.</li></ul>
<p>July 29, 2001, V1.501 (Beta) </p>
<ul>
<li>Adding AutoDetect property.
<li>Compatibility issues with Delphi4.</li></ul>
<p>July 25, 2001, V1.5 </p>
<ul>
<li>Support for TToolbar.
<li>Getting closer to XP style appearance.
<li>New options. </li></ul>
<p>June 23, 2001</p>
<ul>
<li>Compatibility issues with Delphi4.
<li>Changing the way of menus itration.
<li>Making the blue select rectangle little thinner. </li></ul>
<p>June 21, 2001</p>
<ul>
<li>Bug fixes.
<li>Items correctly sized even if no image list assigned.
<li>Shaded colors for top menu items if fixed for some menu bar
colors.</li></ul>
<p>June 19, 2001 </p>
<ul>
<li>Release the first version.</li></ul>
<p>
<hr id=HR1 SIZE=1 width="100%">
<p></p>
<p></p>
<p><font size=1> </font> This component is based on article I posted at <a
href="http://www.delphi3000/articles/article_2246.asp">Delphi3000.com</a>.</p>
<hr size=1 width="100%">
<p></p>
<p> </p>
<p> </p></TD></TR></TBODY></TABLE>
<P> </P>
<P align=center> </P>
<P align=center><FONT size=-3><a
href="http://www.shagrouni.com">Shagrouni</a> 2002 Khaled Shagrouni <A href="mailto:shagrouni@hotmail.com" > shagrouni@hotmail.com</A>
</FONT></P></CENTER>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -