P pacific66 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-22 #1 当主窗体用鼠标拉动时,窗体上的控件如:pagecontrol,edit,..等所有的都能同时做同比例 的改变。如何实现??? 能提示以下吗,朋友???
N nizijian Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-22 #2 procedure TForm1.FormCreate(Sender: TObject); begin Edit1.Width:=Width div 3; end; procedure TForm1.FormCanResize(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean); begin Resize:=true; Edit1.Width:=NewWidth div 3; end;
procedure TForm1.FormCreate(Sender: TObject); begin Edit1.Width:=Width div 3; end; procedure TForm1.FormCanResize(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean); begin Resize:=true; Edit1.Width:=NewWidth div 3; end;
来 来如风 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-22 #3 //oriwidth、oriheight是窗体初始化时的widht和height,是全局变量 //在from的onresize事件中添上 scaleby(form1.Width,oriwidth); oriwidth:=form1.Width; scaleby(form1.Height,oriheight); oriheight:=form1.Height;
//oriwidth、oriheight是窗体初始化时的widht和height,是全局变量 //在from的onresize事件中添上 scaleby(form1.Width,oriwidth); oriwidth:=form1.Width; scaleby(form1.Height,oriheight); oriheight:=form1.Height;
P pacific66 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-22 #6 谢谢各位的帮忙,我已经做出来了,我已经按功分配分了。