S
SevenOrient
Unregistered / Unconfirmed
GUEST, unregistred user!
program Test;
uses
Forms,
Dialogs,
Classes,
TypInfo,
Windows,
Messages,
Unit1 in 'Unit1.pas' {frmFace},
Unit2 in 'Unit2.pas' {frmSubmain};
{$R *.res}
var
vi_Counter1:integer;
begin
Application.Initialize;
with TfrmFace.Create(Application) do
begin
ShowModal;
end;
Application.CreateForm(TfrmSubmain, frmSubmain);
with Application do begin
//我想在这里实现。
for vi_Counter1 := 0 to ComponentCount-1 do
begin
//Find all the Auto-create forms
if Components[vi_Counter1]is TForm then
with (Components[vi_Counter1]as TForm)do
begin
//我想在这里调用函数实现,但是函数怎么写?
//我已经写了一个,但是不行,在最底下。
end;
end;
end;
Application.Run;
end.
//禁止窗体大小改变:
procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo;Sender:TObject); //enable change form size
begin
inherited; //这行出错!
with Msg.MinMaxInfo^ do begin
ptMinTrackSize.x:= TForm(Sender).width;
ptMaxTrackSize.x:= TForm(Sender).width;
ptMinTrackSize.y:= TForm(Sender).height;
ptMaxTrackSize.y:= TForm(Sender).height;
end;
uses
Forms,
Dialogs,
Classes,
TypInfo,
Windows,
Messages,
Unit1 in 'Unit1.pas' {frmFace},
Unit2 in 'Unit2.pas' {frmSubmain};
{$R *.res}
var
vi_Counter1:integer;
begin
Application.Initialize;
with TfrmFace.Create(Application) do
begin
ShowModal;
end;
Application.CreateForm(TfrmSubmain, frmSubmain);
with Application do begin
//我想在这里实现。
for vi_Counter1 := 0 to ComponentCount-1 do
begin
//Find all the Auto-create forms
if Components[vi_Counter1]is TForm then
with (Components[vi_Counter1]as TForm)do
begin
//我想在这里调用函数实现,但是函数怎么写?
//我已经写了一个,但是不行,在最底下。
end;
end;
end;
Application.Run;
end.
//禁止窗体大小改变:
procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo;Sender:TObject); //enable change form size
begin
inherited; //这行出错!
with Msg.MinMaxInfo^ do begin
ptMinTrackSize.x:= TForm(Sender).width;
ptMaxTrackSize.x:= TForm(Sender).width;
ptMinTrackSize.y:= TForm(Sender).height;
ptMaxTrackSize.y:= TForm(Sender).height;
end;