constructor TCustomForm.CreateNew(AOwner: TComponent; Dummy: Integer);
begin
inherited Create(AOwner);
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
csSetCaption, csDoubleClicks];
Left := 0;
Top := 0;
Width := 320;
Height := 240;
FIcon := TIcon.Create;
FIcon.Width := GetSystemMetrics(SM_CXSMICON);
FIcon.Height := GetSystemMetrics(SM_CYSMICON);
FIcon.OnChange := IconChanged;
FCanvas := TControlCanvas.Create;
FCanvas.Control := Self;
FBorderIcons := [biSystemMenu, biMinimize, biMaximize];
FBorderStyle := bsSizeable;
FWindowState := wsNormal;
FDefaultMonitor := dmActiveForm;
FInCMParentBiDiModeChanged := False;
FPixelsPerInch := Screen.PixelsPerInch;
FPrintScale := poProportional;
FloatingDockSiteClass := TWinControlClass(ClassType);
FAlphaBlendValue := 255;
FTransparentColorValue := 0;
Visible := False;
ParentColor := False;
ParentFont := False;
Ctl3D := True;
Screen.AddForm(Self);
FSnapBuffer := 10;
end;
这是从delphi7 的forms单元摘出来的。谁能知道这里的dummy是什么意思。
begin
inherited Create(AOwner);
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
csSetCaption, csDoubleClicks];
Left := 0;
Top := 0;
Width := 320;
Height := 240;
FIcon := TIcon.Create;
FIcon.Width := GetSystemMetrics(SM_CXSMICON);
FIcon.Height := GetSystemMetrics(SM_CYSMICON);
FIcon.OnChange := IconChanged;
FCanvas := TControlCanvas.Create;
FCanvas.Control := Self;
FBorderIcons := [biSystemMenu, biMinimize, biMaximize];
FBorderStyle := bsSizeable;
FWindowState := wsNormal;
FDefaultMonitor := dmActiveForm;
FInCMParentBiDiModeChanged := False;
FPixelsPerInch := Screen.PixelsPerInch;
FPrintScale := poProportional;
FloatingDockSiteClass := TWinControlClass(ClassType);
FAlphaBlendValue := 255;
FTransparentColorValue := 0;
Visible := False;
ParentColor := False;
ParentFont := False;
Ctl3D := True;
Screen.AddForm(Self);
FSnapBuffer := 10;
end;
这是从delphi7 的forms单元摘出来的。谁能知道这里的dummy是什么意思。
[ 大米,呵呵 ]
n.哑巴, 傀儡, 假人, 假货
adj.虚拟的, 假的, 虚构的
n.[计] 哑元
我想不是留着扩展的,就是从哪里直接copy过来的在constructor TDataModule.CreateNew(AOwner: TComponent; Dummy: Integer);
begin
inherited Create(AOwner); if Assigned(AddDataModule) and (Dummy >= 0) then
AddDataModule(Self);
end;用到了可能开始设计TCustomForm这个类的时候,有相同的想法吧,