加载中…
  
博文
(2012-08-28 12:56)
标签:

杂谈

好了,进入正题,首先说明initialization 和 finalization 在代码单元中的位置:
************************************************************
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;

var
Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
ShowMessage('1 FormCreate');
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
ShowMessage('1 Destroy');
end;

initialization
ShowMessage('1 ini');{单元初始

标签:

杂谈

IntToHex(int Value, int Digits)
  来源: 在Delphi、Pascal或C++ Builder中使用。
  功能: 把一个char型字符转换成16进制形式的字符串。
  如:delphi中定义一个ch:char; 那么
  IntToHex(Ord(ch)
博文

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有