procedure TfrMain.LoadPictureClick(Sender: TObject);
begin
if ActiveMDIChild <> nil then
TfrChild(ActiveMDIChild).LoadPicture;
end;
uses ExtDlgs;
...
procedure TfrChild.LoadPicture;
var OpenPicDlg : TOpenPictureDialog;
begin
OpenPicDlg := TOpenPictureDialog.Create(Self);
if OpenPicDlg.Execute then
begin
Image1.Picture.LoadFromFile(OpenPicDlg.FileName);
end;
OpenPicDlg.Free;
end;
...
type
TfrChild = class(TForm)
...
private
public
procedure LoadPicture;
end;
...
frMain.WindowMenu := ChildList;
procedure TfrMain.MinimizeAl1Click(Sender: TObject);
var i: integer;
begin
for i:= MdiChildCount - 1 downto 0 do
MDIChildren[i].WindowState := wsMinimized;
end;