S
shigongping
Unregistered / Unconfirmed
GUEST, unregistred user!
1.创建单个窗口对象
用Application.Create(TForm1,Form1);
Form1.Show;//创建了窗口Form1
如何判定一个窗口是否已经创建了,如果已经创建了,Form1可能处于最小化状态,如何把它
还原为该窗口刚创建时所规定的大小和位置
2.创建多个窗口对象
用var MdiChild:TForm1;
begin
MdiChild:=TForm1.Create(Self);
MdiChild:=TForm1.Create(Application);//这两个拥有者的差别是什么呢
end
3.关于Sender的问题
procedure TfrmZipcode.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (TCustomADODataSet(Qry).Recno mod 2)=0 then //记录号是双数
begin
(sender as TDBGrid).Canvas.Font.Color:=clblack;
//如果这里把sender as TDBGrid直接换为DBGrid1,为什么不行呢
(sender as TDBGrid).Canvas.Brush.color:=$00F0E8D9
end
else
begin
(sender as TDBGrid).Canvas.Font.Color:=clblack;
(sender as TDBGrid).Canvas.Brush.color:=clWindow
end;
(sender as TDBGrid).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
谢谢大家给与解答,本人是一个新手,希望大家多多帮忙
用Application.Create(TForm1,Form1);
Form1.Show;//创建了窗口Form1
如何判定一个窗口是否已经创建了,如果已经创建了,Form1可能处于最小化状态,如何把它
还原为该窗口刚创建时所规定的大小和位置
2.创建多个窗口对象
用var MdiChild:TForm1;
begin
MdiChild:=TForm1.Create(Self);
MdiChild:=TForm1.Create(Application);//这两个拥有者的差别是什么呢
end
3.关于Sender的问题
procedure TfrmZipcode.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (TCustomADODataSet(Qry).Recno mod 2)=0 then //记录号是双数
begin
(sender as TDBGrid).Canvas.Font.Color:=clblack;
//如果这里把sender as TDBGrid直接换为DBGrid1,为什么不行呢
(sender as TDBGrid).Canvas.Brush.color:=$00F0E8D9
end
else
begin
(sender as TDBGrid).Canvas.Font.Color:=clblack;
(sender as TDBGrid).Canvas.Brush.color:=clWindow
end;
(sender as TDBGrid).DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
谢谢大家给与解答,本人是一个新手,希望大家多多帮忙