.


:




:

































 

 

 

 





Delphi . Delphi .
.

type
TForm1 = class (TForm)
private
{ .}
public
{ .}
end;

TForm1.
, .

var Form1: TForm1;

Form1, TForm1 . . , View/ Project Source. :

Application.CreateForm(TForm1, Form1);

: , , . Application .

SDI-, MDI- , , .
Create . TForm1 Caption 'New Form'.

Form1:= TForm1.Create(Application);
Form1.Caption:= 'New Form';

Form1 . , , :

with TFormI.Create(Application) do
Caption:= 'New Form';

: MDI- Show , Delphi MDI-. SDI- Show.

Delphi . , Project Options, . 1.14, Auto-create forms.

. 1.14. Project Options

, MDIChildren, .

MDI- TForm

TForm , MDI-.

ActiveMDIChild

TForm, . , , .

, , , TMemo, memDailyNotes. TfrmMDIChild. Clear , memDailyNotes . .

procedure TfrmMDIParent.spbtnClearClick(Sender: TObject);
begin
if not (ActiveMDIChild = Nil) then
if ActiveMDIChild is TfrmMDIChild then
TfrmMDIChild(ActiveMDIChild).memDailyNotes.Clear;
end;

, ActiveMDIChild Nil, .

ActiveMDIChild TForm, memDailyNotes TfrmMDIChild. , .. ActiveMDIChild TfrmMDIChild.

Clear memDailyNotes.

 





:


: 2016-09-06; !; : 536 |


:

:

: , .
==> ...

1841 - | 1443 -


© 2015-2024 lektsii.org - -

: 0.011 .