解决方案 »
- 求几个控件
- 求EMS Query Builder componnets 2005(3.0)
- combobox能实现多列的显示吗?
- CSDN活过来了,今天再散200分收山,马上结帖,接分要快(前五名)。
- 一个很简单的问题,请帮手,在线等…
- 请问在Delphi7里interbase server manager在哪儿!谢谢大家能告诉我吗?
- 我使用NetValidateName() API函数,为何总是返回1780?
- 这段代码是什么意思??
- 如何去掉DBgrideh单元格虚线
- 如何在程序或vxd中实现暂停其他程序的运行?
- 目前delphi分布式三层架构,中间件用midas还是datasnap?
- 请教如何代码实现修改360,搜狗浏览器主页?
方法2:res资源文件放在你的项目文件相同的目录下面!
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxLocalization, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxStyles, cxCustomData, cxGridCustomView,
cxGridChartView, cxClasses, cxGridLevel, cxGrid;type
TForm1 = class(TForm)
cxLocalizer1: TcxLocalizer;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
cxGrid1ChartView1: TcxGridChartView;
cxGrid1ChartView1Series1: TcxGridChartSeries;
cxGrid1ChartView1DataGroup1: TcxGridChartDataGroup;
private protected
procedure Loaded; override;
public end;var
Form1: TForm1;implementation{$R *.dfm}
{-------------------------------------------------------------------------------
过程名: TForm1.Loaded
作者: harlanchou
日期: 2013.08.29
说明: cxLocalizer1放在这里比较合适,其它的地方无效
-------------------------------------------------------------------------------}
procedure TForm1.Loaded;
begin
//=========================================================
// 方法一:使用ini文件来汉化
//=========================================================
cxLocalizer1.StorageType := lstIni;
cxLocalizer1.FileName := 'C:\Program Files\Borland\Delphi7\Projects\test.ini';//=========================================================
// 方法二:使用Res来汉化
//=========================================================
cxLocalizer1.StorageType := lstResource; //加载Res有两种方法 方法一动态加态
cxLocalizer1.FileName := 'C:\Program Files\Borland\Delphi7\Projects\test.res';
//方法2 把res文件编译入程序{$R test.res}
cxLocalizer1.LoadFromResource(HInstance); //这里最好不要使用这个属性来设置语言种类
//cxLocalizer1.Language := '中文(中国)';
cxLocalizer1.Locale := 2052;
cxLocalizer1.Active := True;
inherited;
end;end.