易截截图软件、单文件、免安装、纯绿色、仅160KB

终于搞定了Delphi的Unicode支持(Tnt控件)

原来是要在FormCreate中加入以下代码:
procedure TTntForm1.TntFormCreate(Sender: TObject);
begin
  //这句很关键.对于平台的支持.
  if Win32Platform = VER_PLATFORM_WIN32_NT then
    Font.Name := 'MS Shell Dlg 2'
  else
    Font.Name := 'MS Shell Dlg';
end;
这样就可以很好的实现对各种语言字体的支持了.
经验总结:
凡事还是用心去做,都会有异想不到的收获的.


相关文档:

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

 1.策略类
{《HeadFirst设计模式》之策略模式 }
{ 本单元中的类为策略类 }
{ 编译工具: Delphi7.0 }
{ E-Mail : xshlife@163.com }

unit uStrategy;

interface

type
{飞行接口,及其实现类 }

IFlyBehavior = Interface(IInterface)
procedure Fly;
......

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

1.被装饰者
{《HeadFirst设计模式》之装饰模式 }
{ 本单元中的类为被装饰者 }
{ 编译工具: Delphi7.0 }
{ E-Mail : xshlife@163.com }

unit uComponent;

interface

type
TBeverage = class(TObject) //抽象饮料类
protected
FDescription: String;
public
......

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

1. 复杂的子系统
unit uSubObject;

interface

type

{ TAmplifier与TTuner,TCDPlayer,TDVDPlayer相互依赖。 }
{ 在TTuner等的简单实现时用不到对TAmplifier的引用, }
{ 但现实生活中就应该让TAmplifier提供服务,所以这里保留了。 }
{ TProjector对T ......

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

1. 命令的接受者
unit uReceiveObject;
interface
type
TLight = class(TObject)
public
procedure Open;
procedure Off;
end;
TGarageDoor = class(TObject)
public
procedure Up;
procedure Down;
procedure Stop;
procedure LightOn;
procedure LightOff;
end; ......

Delphi 设计模式:《HeadFirst设计模式》Delphi7代码

没有应用状态模式的代码
1. 工程文件
program Project1;
{$APPTYPE CONSOLE}
uses
uGumballMachine in 'uGumballMachine.pas';
var
aGumballMachine: TGumballMachine;
begin
aGumballMachine := TGumballMachine.Create(5);
aGumballMachine.InsertQuarter;
aGumballMachine.TurnCrank;
Writeln; ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号