-=> Hasan Kahveci wrote with startling eloquence to All <=-
HK> i cant control my child form.
HK> With ActiveMDIChild I can use TForm's methods
HK> (example; ActiveMDIChild.Close;),
HK> but i can'u call my Forms methods
HK> ( example; ActiveMDIChild.MyProcedure(xx);).
HK> How can I call my child form procedure from MDIForm.
In your child form, you're probably defining your child type with a name like
"TMDIChild".
To use the methods of that type from your main form, try something like this
example (from a program of mine)...
procedure TMainForm.Save1Click(Sender: TObject);
begin
if ActiveMDIChild nil then
with TMDIChild(ActiveMDIChild) do begin
if Pos('NONAME', Editor1.FileName) = 1 then
SaveAs1Click(Self)
else
Editor1.SaveToFile(Editor1.FileName);
end;
end;
The "with TMDIChild(ActiveMDIChild) do" portion is almost certainly what you
need.
EEAS
eric@kobayashi.com
--- Blue Wave/DOS v2.21
---------------
* Origin: The Aircrash Bureau Chicago 312-278-1195 33.6 (1:115/327)
|