Delphi5中文帮助第一预览版发布(0分)

  • 主题发起人 主题发起人 大虎
  • 开始时间 开始时间
邵誉峰:
请去取
 
I have!
请到我的留言板留言或发信给我
 
给我一份
ahead2000@263.net
 
如下所示,挺不错:

Our next example is a Windows application built with Delphi抯 Visual Component Library (VCL). This program uses Delphi-generated form and resource files, so you won抰 be able to compile it from the source code alone. But it illustrates important features of Object Pascal. In addition to multiple units, the program uses classes and objects.
我们的下一个例子是用Delphi的可视化组件库(VCL)创建的Windows应用程序。此程序使用Delphi生成的窗体和资源文件,所以你就不能单独使用源代码就编译它。但是它说明了Object Pascal的许多重要特性。除了多个单元之外,该程序还使用了类和对象。
The program includes a project file and two new unit files. First, the project file:
本程序包括一个项目文件和两个新的单元文件。首先我们给出项目文件:
program Greeting;
{ 注释是包含在大括号内的 }

uses
Forms,
Unit1 { Form1的单元 },
Unit2 { Form2的单元 };

{$R *.RES} { 此指令将连接程序的资源文件}

begin

{ 调用应用程序 }
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.

Once again, our program is called Greeting. It uses three units: Forms, which is part of the VCL;
Unit1, which is associated with the application抯 main form (Form1);
and Unit2, which is associated with another form (Form2).
我们还是将程序叫做Greeting吧。它使用了三个单元:Forms,这是VCL的一部分;Unit1,这是与应用程序主窗体(Form1)对应的;以及Unit2
,这是与另一个窗体(Form2)对应的。
The program makes a series of calls to an object named Application, which is an instance of the TApplication class defined in the Forms unit. (Every Delphi project has an automatically generated Application object.) Two of these calls invoke a TApplication method named CreateForm. The first call to CreateForm creates Form1, an instance of the TForm1 class defined in Unit1. The second call to CreateForm creates Form2, an instance of the TForm2 class defined in Unit2.
程序对一个叫做Application的对象进行了一系列调用,该对象是定义在Forms单元中TApplication类的一个实例。(每个Delphi项目都有一个自动生成的Application对象。)在这一系列调用中,有两个是调用TApplication的CreateForm方法的。第一个对CreateForm的调用创建Form1
,这是定义在Unit1中的TForm1类的一个实例。第二个对CreateForm的调用创建Form2,这是定义在Unit2中的TForm2类的一个实例。
Unit1 looks like this:
下面是Unit1的代码:
unit Unit1;

interface

uses { 这些单元是Delphi可视化组件库(VCL)的一部分 }
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
end;


var
Form1: TForm1;

implementation

uses Unit2;
{ 就是在Unit2中定义的Form2 }

{$R *.DFM} { 此指令将连接Unit1的窗体文件}

procedure TForm1.Button1Click(Sender: TObject);
begin

Form1.Hide;
Form2.Show;
end;


end.

Unit1 creates a class named TForm1 (derived from the VCL抯 TForm) and an instance of this class, Form1. TForm1 includes a button
桞utton1, an instance of TButton梐nd a procedure named TForm1.Button1Click that is called at runtime whenever the user presses Button1. TForm1.Button1Clickdo
es two things: it hides Form1 (the call to Form1.Hide) and it displays Form2 (the call to Form2.Show). Form2 is defined in Unit2:
Unit1创建了一个叫做TForm1的类(该类是从VCL的TForm类派生出来的)以及该类的一个实例Form1。TForm1中包含一个叫做Button1的按钮,该按钮是一个TButton类的实例;而且还有一个叫做TForm1.Button1Click的过程用于在运行状态的任意时刻用户单击Button1的时候执行。TForm1.Button1Click做两件事:隐藏Form1(就是调用Form1.Hide)并显示Form2(就是调用Form2.Show)。而Form2是定义在Unit2中的:
unit Unit2;

interface

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

type
TForm2 = class(TForm)
Label1: TLabel;
CancelButton: TButton;
procedure CancelButtonClick(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
end;


var
Form2: TForm2;

implementation

uses Unit1;

{$R *.DFM}

procedure TForm2.CancelButtonClick(Sender: TObject);
begin

Form2.Close;
end;


procedure TForm2.FormClose(Sender: TObject;
var Action: TCloseAction);
begin

Form1.Show;
end;


end.

Unit2 creates a class named TForm2 and an instance of this class, Form2. TForm2 includes a button (CancelButton, an instance of TButton) and a label (Label1, an instance of TLabel). You can抰 see this from the source code, but Label1 displays a caption that reads
揌ello world!?The caption is defined in Form2抯 form file, UNIT2.DFM.
Unit2创建了一个叫做TForm2的类及其实例Form2。TForm2包含了一个按钮(CancelButton,一个TButton类的实例)和一个标签(Lable1,一个TLabel类的实例)。你从源代码中看不出来,Label1上显示了“Hello world!”的标题。该标题是定义在Form2的窗体文件UNIT2.DFM
中的。
Unit2 defines two procedures. TForm2.CancelButtonClick is called at runtime whenever the user presses CancelButton;
it closes Form2
. TForm2.FormClose is called at runtime whenever Form2 closes;
it reopens Form1. These procedures (along with Unit1抯 TForm1.Button1Click) are known as event handlers because they respond to events that occur while the program is running. Event handlers are assigned to specific events by the form (.DFM) files for Form1 and Form2.
Unit2定义了两个过程。TForm2.CancelButtonClick将在运行状态的任意时刻用户单击CancelButton时调用;它将关闭Form2。
TForm2.FormClose将在运行状态的任意时刻Form2将要关闭时调用;它将重新打开Form1。这些过程(也包括Unit1中的TForm1.Button1Click
)之所以被称为事件处理器,是因为它们响应程序运行时发生的事件。事件处理器是在Form1和Form2的窗体(.DFM)文件中指定给特定事件的。
When the Greeting program starts, Form1 is displayed and Form2 is invisible. (By default, only the first form created in the project file is visible at runtime. This is called the project抯 main form.) When the user presses the button on Form1, Form1 disappears and is replaced by Form2, which displays the 揌ello world!?greeting. When the user closes Form2 (by pressing CancelButton or the Close button on the title bar), Form1 reappears.
当Greeting程序开始的时候,会显示Form1,而Form2不可见。(缺省情况下,运行状态只有在项目文件中创建的第一个窗体可见。该窗体被称为项目的主窗体。)当用户单击Form1上的按钮的时候,Form1就会消失而显示Form2,在Form2上显示了“Hello world!”致词。当用户关闭Form2(单击CancelButton或标题栏上的关闭按钮)时,Form1会重新显示出来。
中文DELPHI小组汉化
 
真是振奋人心的消息!
哪位能给我Mail一份。
zyli@smtp.njau.edu.cn(5M)
先谢谢了!有分送!
 
我也
真是振奋人心的消息!
哪位能给我Mail一份。
wzhyz@yeah.net(8M)
先谢谢了!有分送!
 
给我一份!THANK YOU!
HWJZXL@163.NET
 
我也想要一份!
wuwzy@sina.com
 
厚着脸皮要要要!chenyu888@etang.com.送分100酬谢!
 
也发我一份吧,tjl1@163.net
 
也发我一份吧 lodgue@sina.com
 
我也要!多谢了!
E-MAIL:sngmd@263.net
 
我也来一份吧,多谢多谢。分数好算。
 
wang_y_g@263.net
 
give a copy ,please.
thanks
 
给我一份,小弟从未用过Delphi 5 不过中文帮助吗?
还请...
My email: seawin@bentium.net
 
也给我一份吧,再这儿小弟谢谢各位大虾
zhou0523@netease.com
 
下载了一个,感觉很失望,只是汉化了一小部分。
现在DELPHI 5出了中文手册,全套4册,哪有电子版下载请通知我。
 
也给我一份吧,再这儿小弟谢谢各位大虾
zzhlr@371.net
 
你好
给我一份mypet@chinaren.com


mypet
 

Similar threads

D
回复
0
查看
909
DelphiTeacher的专栏
D
D
回复
0
查看
704
DelphiTeacher的专栏
D
D
回复
0
查看
666
DelphiTeacher的专栏
D
D
回复
0
查看
661
DelphiTeacher的专栏
D
后退
顶部