begin
SaveDialog1.FileName:=ActiveMDIChild.Caption; //問题所在?
IF saveDialog1.Execute Then
Begin
IF (FileExists(SaveDialog1.FileName)) and
(ActiveMDIChild.Caption<>SaveDialog1.FileName) Then
Begin
IF (MessageDlg('文件'+SaveDialog1.FileName+'已存在,是否覆盖?',
Mtconfirmation,[Mbyes,Mbno],0)=mryes) then
Begin
TMDIChildForm(ActiveMDIChild).Memo1.Lines.SaveToFile(SaveDialog1.FileName);
TMDIChildForm(ActiveMDIChild).Caption:=SaveDialog1.FileName;
End;
end
Else
Begin
TMDIChildForm(ActiveMDIChild).Memo1.Lines.SaveToFile(SaveDialog1.FileName);
End;
end;
end;我是個初學者,我不太清楚 TMDIChildForm(ActiveMDIChild) 里面的ACtiveMDICHild是用来做什麽的?我找不到它的聲明。我不知它从哪来的。。
SaveDialog1.FileName:=ActiveMDIChild.Caption; //問题所在?
IF saveDialog1.Execute Then
Begin
IF (FileExists(SaveDialog1.FileName)) and
(ActiveMDIChild.Caption<>SaveDialog1.FileName) Then
Begin
IF (MessageDlg('文件'+SaveDialog1.FileName+'已存在,是否覆盖?',
Mtconfirmation,[Mbyes,Mbno],0)=mryes) then
Begin
TMDIChildForm(ActiveMDIChild).Memo1.Lines.SaveToFile(SaveDialog1.FileName);
TMDIChildForm(ActiveMDIChild).Caption:=SaveDialog1.FileName;
End;
end
Else
Begin
TMDIChildForm(ActiveMDIChild).Memo1.Lines.SaveToFile(SaveDialog1.FileName);
End;
end;
end;我是個初學者,我不太清楚 TMDIChildForm(ActiveMDIChild) 里面的ACtiveMDICHild是用来做什麽的?我找不到它的聲明。我不知它从哪来的。。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货