vclskin美化控件的用法

学习DELPHI时为了美化程序,

所以在网上找到了这个插件!

 

 

1. VCLSkin综述
 
VCLSkin 是一个能让Delphi程序变得非常漂亮的控件包. 它允许允许软件开发人员不用修改程序代码便把软件界面变得非常漂亮。它的美化支持窗体和控件和菜单。VCLSkin同时也提供了大量高质量的skin(皮肤)让你应用于你的程序。
2. VCLSkin特点
 
VCLSkin 是一个用于让用户的程序界面更加漂亮的扩展控件。 它允许软件开发人员不用修改源代码就能让他们的程序界面更加漂亮。一个标准的程序界面能在窗体放入VCLSkin控件后变得非常漂亮,而这公公需要几分钟的时间。
VCLSkin 能做些什么 ?
不像其它控件那样,你需要修改源代码才能构建一个漂亮的界面, VCLskin 能让Delphi的标准控件在一下子就变得非常漂亮,而这一切都不用修改源代码。
 
VCLSkin 支持以下的窗体:
  • Delphi Form
  • MDIform . (normal,Maximized, MInimized)
  • Common Windows dialogs (Open/Save,Font,Print,Color).
  • MsgBox.
  • Exception MsgBox.
VCLSkin 支持的标准控件:
  • The title bar of TForm
  • The title bar buttons
  • The borders of Tform
  • Tbutton,TBitbtn.
  • Tradiobutton and Tcheckbox
  • Tmainmenu and Tpopupmenu
  • Toolbar buttons
  • TTabcontrol and TPageControl
  • T Progressbar
  • TStatusbar
  • TCustomCombox,Tcombobox, TDbCombobox
  • TPanel and TGroupbox
  • TMemo, TListBox,TListView,TTreeview
  • TRadioGroup , TDBRadioGroup.
  • TCustomGrid,TStringgrid,TDrawgrid,Tdbgrid.
  • Third party component, Enlib, AdvGrid ..
同时也支持大量的第三方控件。
 

 
 
3.安装
 
你可以像安装其它控件一样安装这夽控件,其实就这几步:
解压缩 Vclskin2.zip 到任意目录 在 Delphi IDE 环境中选择菜单 "File. Open...", 然后找到连接库vclskindX.dpk, 按着点击Compile按钮。 在 Environment 添加VCLSkin控件所在的路径。
DX - Delphi X, X - version CBX - CBuilder X, X - version
1. TSkinData
 
TSkinData 主要用于美化你的程序, 只要把TSkinData控件放下去,它就能自动美化所有窗体。
属性
Active : 使用或取消对程序的美化。
DisableTag : 取消对某个特定的组件的美化; 把组件的Tag属性设为99就行了。
(control.tag mod 100=disabletag)
SkinControls: 指定哪类组件能被美化.
SkinFile: skin(皮肤)文件的包含路径的文件名,在运行时加载。
SkinStore : 在设计模式时储备的skin文件.
SkinFormType: 能使用多种美化方式.
方法
LoadFromStream(Stream: TStream);
LoadFromFile(value:string);
LoadFromCollection(astore:TSkinStore;aindex:integer);
在运行时装载skin文件.
UpdateSkinControl(fParent:Tform);
UpdateMenu(fParent:Tform);
在运行时组件创建时进行美化。
事件
OnFormSkin(Sender:TObject;aName:string;Var DoSkin:boolean);
OnFormSkin 事件的发生先于美化窗体, 如果 Doskin 为 true, Vclskin 就会美化这个窗体, 如果为false,Vclskin 就会跳过这个窗体. aName 是窗体的类名.
OnSkinChangned(Sender:TObject);
OnSkinChanged 发生在skin文件改变之后。
 
 
2. TSkinStore
 
TSkinStore 能让你在设计模式时储存多个skin文件。
TSkinData 能在运行时从 TSkinStore 装载skin文件:
TSkinData.LoadFromCollection(astore:TSkinStore;aindex:integer),
 
 
3. 怎么美化程序界面
 
你可以在几分钟内构建一个漂亮的程序.
1 把 TSkindata 控件放在主窗体上。
2 设置Skindata.skinstore属性 , 把skin文件储存在你的程序中。
3 设置Skindata.active = true
4 编译运行你的程序。
 
 
4.  VCLSkin   FAQ
 
 
 
1 如果我的工程中有14个窗体,用不用每个窗体都放一个skin控件?
不用,你只需要放置一个Tskindata在你的主窗体,Vclskin就能自动美化每个窗体。
2 怎样美化一个内嵌的窗体 ?
Vclskin 不能自动美化内嵌窗体,你要手动控制它。压缩包中有一个"NestedForm"的例子,讲的是在运行状态美化内嵌窗体、框架的。
3 怎样美化动态控件 ?
你需要手动控制它。代码如下:
control:=Tmycontrol.create(form1);
skindata1.UpdateSkincontrol(form1); // add this line to skin dynamic control.
4 怎样美化依靠窗体 ?
Vclskin 支持停靠窗体. 例程代码如下:
procedure TDockableForm.FormShow(Sender: TObject);
begin

if MainForm.skindata1.active then MainForm.skindata1.skinform(handle);

end ;
5 怎么美化动态的右键菜单 ?
例程代码如下:
popup:=Tpopupmenu.create(form1);
..... add menuite
skindata1.UpdateMenu(form1); //add this line
popup.popup(x,y);
6 怎样美化动态窗体 ?
Vclskin 可以美化动态窗体 , 但不能自动美化内嵌窗体. 点击这儿查看如何美化内嵌窗体 .
7 找不到文件 'c:\program files\borland\delphi7\SM\winskindata.pas'
Delphi7 试用版 Delphi7正式版 的Dcu文件格式是不一样的。
如果你使用的是正式版,你可以安装一个演示包。 vclskin2.zip .
如果你使用的是试用版,你可以安装一个演示包。 D7trial.zip .
8 使用 FastReport 时,出现了“无效操作,控件没有父窗体的的错误提示 ?
设置 TSkindata.skincontrols.xcFastReport = true 就可以解决这个问题。
9 使用 ReportBuilder 出现了“无效操作,控件没有父窗体的错误提示?
你可以在 TSkindata.OnformSkin 事件中取消美化这个控件。 代码如下 :
procedureTform1.SkinData1FormSkin(Sender: TObject;
aName: String; var DoSkin: Boolean);
begin

//'TppPrintPreview' 就是要取消美化的窗体名称。
if aName='TppPrintPreview' then doskin:=false;

end;
10 如何存取skin文件的颜色?
你可以借助 Tskindata.colors[] 属性来存取颜色。
比如说 , 窗体的背景色是 : skindata.Colors[csButtonFace] .
TShemeColor=(csText,csTitleTextActive,csTitleTextNoActive,
csButtonFace,csButtonText,
csButtonHilight,csButtonlight,csButtonShadow,csButtonDkshadow,
csSelectText,csSelectBg,csHilightText,csHilight,
csMenuBar,csMenuBarText,csMenuText,csMenubg,
csScrollbar,csTextDisable);
TShemeColors=array[csText..csTextDisable] of Tcolor;
Skindata.Colors: TShemeColors;
11 用户能自定义那些可视化控件的外观吗?
你可以使用 skin builder 自定义细节.
12 怎样取消美化某个窗体或控件?
设置 form.tag=99 取消 美化这个窗体。
13 如何在美化一个工程的窗体标题栏和菜单的风格?
设置 TSkindata.skincontrols.xcMainmenu = false .

 

//==========

通用控件安装方法:
----------
基本安装
1、对于单个控件,Componet-->install component..-->PAS或DCU文件-->install;
2、对于带*.dpk文件的控件包,File-->Open(下拉列表框中选*.dpk)-->install即可;
3、对于带*.bpl文件的控件包,Install Packages-->Add-->bpl文件名即可;
4、如果以上Install按钮为失效的话,试试Compile按钮;
5、是run time lib则在option下的packages下的runtimepackes加之。
    如果编译时提示文件找不到的话,一般是控件的安装目录不在Delphi的Lib目录中,有两种方法可以解决:
1、反安装的源文件拷入到Delphi的Lib目录下;
2、或者Tools-->Environment Options中把控件源代码路径加入到Delphi的Lib目录中即可。
注意:所安装的控件是否与你所用的Delphi版本相适应。
----------
控件删除
在Component/Install Packages中删除。
选Component/configure Palette…
有pages和components两个区域
双击components区域,选中要删除得控件,下面有得Delete按钮
但系统提供的控件只能Hide,不能delete。
打开控件所在的包文件(*.dpk),从中删除控件那个文件,再重新编译该包即可。

如果是整个控件包都要删除的话,project->Option->Packages,删掉那个packages,收工。

VCLSkin5.60:点击下载

VCLSkin皮肤(233种):点击下载

 VCLSkin皮肤制作工具:我的网盘

VCLSkin皮肤制作方法

 

80de40d928f9fd6311df9bee.jpg

9bd08bec5439c96862d09fee.jpg

1.Convert Msstyle file 1.Convert Msstyle文件

1. 1。 Click "Import" button in toolbar.点击“导入”工具栏按钮。
2. 2。 Select color theme in list.选择列表中的颜色主题。

2. 2。 Skin Fundamentals 皮肤基础

The first step in learning skin is to understand how it works.在学习皮肤的第一步是要了解它是如何工作。 Unlike some apps where you create a mostly static skin, Vclskin must work with the dynamic environment of Windows.不像有些应用程序在创建一个大多是静态的皮肤,Vclskin必须与Windows的动态环境。 The various windows and buttons change shape and size with each program, so Skin must adapt your graphics to each item.各种Windows和按钮改变形状和大小各方案,使皮肤必须适应你的图形的每个项目。 It is important to keep this in mind when creating your design.重要的是要记住这一点在创建你的设计。 With the code, you are able to set how many pixels of the image around the border, are to be left alone.使用代码,您可以设置如何周围的边界图像的像素,是被单独留在家中。 The rest of the image is then stretched or tiled (as you specify) in order to enlarge or compact the image as needed.图像的其余部分,然后拉伸或平铺(如你指定),以图像放大或压缩需要。

3. 3。 Image 图片

001c412782fa5d4c918f9dee.jpg

  • Image margins : margin of image that should not be stretched/tiled. 图像边距 :图像边缘不应被拉伸/平铺。
  • Stretch and Tile : image is tiled or stretched. 拉伸和平铺 :形象是平铺或拉伸。
  • Transparency : draw the image transparently, Transparent Color is clFuchsia,RGB: 255,000,255, $00FF00FF. 透明度 :绘制图像透明的,透明颜色是clFuchsia,的RGB:255000255,$ 00FF00FF。
  • Frame : Image state number. 框架 :图像的状态数。

4. 4。 Windows Border and MainMenu 窗口边框和主菜单

e8dfd50373a50aa308fa93ee.jpg

There are also two other possible image states: inactive and active window.还有其他两个可能的图像状态:不积极,活跃的窗口。 The active window is the window that is currently being used, while the inactive window is any window(s) that is in the background.活动窗口是当前正在使用的窗口,而任何非活动窗口的窗口(县),在背景中。

5. 5。 Title buttons 标题按钮

1b8082ececd0fb72269791ee.jpg

6.Button 6.Button

82f5733dc0bdf3a13d6d97ee.jpg

There are five different states for the buttons image, each displayed at a different time.有五种不同的国家的按钮图像,在不同的时间显示的每个。

  • Normal: The normal state is what you see when the button is just there, undisturbed. 正常:正常状态是什么,你看时,按钮就在那里,不受干扰。
  • Pressed: The pressed state is what you see when the button has been clicked and/or the mouse button is being held down with the cursor over the button. 按:按下状态时看到的就是你的按钮被点击和/或鼠标按钮被关押按钮与光标了。
  • Disabled: This state is visible when the function of the button is not available. 禁用:这种状态是可见的按钮时,该功能不可用。 For example, when you open a new Internet Explorer window, the back button is not available because you have no webpage to go back to at that time.例如,当你打开一个新的Internet Explorer窗口,后面的按钮是不可用,因为你没有网页,回到那个时候。 Therefore, the back button will be displayed with the disabled state.因此,背部按钮将显示为禁用状态。
  • Focus: The focus state is displayed when the mouse cursor passes over the button. 焦点:焦点状态时显示鼠标光标按钮越过了。
  • Default: The default state is displayed. 默认:默认状态显示。

7.Menuitem 7.Menuitem

ac987beed547ffb4b2fb95ee.jpg

8.Color 8.Color

b76277fb58d1e9596d22ebee.jpg

Pick color and capture color 挑选颜色和捕捉色彩
38f461168108e50520a4e9ee.jpg

e72d6d4ace8eec6c09f7efee.jpg
aaab6423f9dd3a1d9822edee.jpg83f8b2526a08d8410cf3e3ee.jpg
122d500ef8d97d857bcbe1ee.jpg
f1c428460a3514466b63e5ee.jpg

转载于:https://www.cnblogs.com/cnajian/archive/2011/06/06/2073914.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值