DELPHI面试题 帮忙看下

来源:百度知道 编辑:UC知道 时间:2024/05/29 12:00:00
研发笔试试卷(Delphi)

第一部分 Delphi知识
1. 如果一个元件希望放到IDE的元件面板上,它必须从________类派生,
如果一个元件能作为其它元件的容器,它必须从_____________类派生,
如果一个元件在运行时可见,它必须从___________________类派生
(A)TGraphicControl (B)TWinControl (C)TComponent (D)TPersistent (E)TControl

2、写出TEdit、TLabel、TTimer的主要继承路径,答题格式TXXX->TXXX->......

3、1) 为防止界面窗体“僵死”,可调用如下代码
A、Application.DoEvent
B、Application.DoEvents
C、Application.Idle
D、Application.ProcessMessages

2) 解释为什么?

4、有如下类定义,请问类THouse的InstanceSize是_______

TPoint = packed record
X: Longint;
Y: Longint;
end;

THouse = class
private
FOwner: string;
FPosition: TPoint;
FBounds: array[0..2] of Integer;
FLessees: TStrings;
public
procedure Paint;
property Owner: string read FOwner;
end;

A、24 B、28 C、32 D、40
5、常用的

先回答你前4题
1. C,B,E
2.TObject-Tpersistent-TCompernent-TWinControl-TCustomEdit,
TObject-Tpersistent-TCompernent-TGraphicControl-TCustomLable,
TObject-Tpersistent-TCompernent
3.D
4.C

这么多问题就20分啊,呵呵,楼主够小气的。