请教大家三道问题 2。先写好一个处理程序比如是buuton1.onclick,新建控件b,b.click= button1.onclick(sender) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 3.实际上就是动态生成控件,lineto即可。 1.要用com接口,不过那个接口我忘了,抱歉!! //2,哈哈哈哈unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin showmessage('aaa');end;procedure TForm1.Button2Click(Sender: TObject);var a : Tbutton;begin a := tbutton.Create(self);; a.Parent := Form1; a.Name := 'button3'; a.OnClick := button1.OnClick;end;end. 动态生成控件,须定义:var bt1:tbutton;bt1:=tbutton.creat(self);bt1.paraent:=self;bt1.left:=...;bt2.left:=...;bt2.caption:='...';bt1.onclick:=myClick;最后退出时最好记得:bt1.free;其中...自己填写,myclick是你写的事件,最好写在这段前面,或者在TYPE中说明! 最好不要在运行时修改组件的NAME属性(BORLAND推荐),容易出问题! to z_x_b(长弓落日金沙丘):[email protected],thanks a lot. 1、动态生成控件;2、不用DLL直接使用扑克组件;3、应用程序的自我删除;4、组件简单动画;5、暂停程序运行;6、MessageBox的一些使用技巧;7、一个经典魔术揭秘;关于动态拖动控件,暂时没有,以后再说!详情请看压缩包中的readme.txt!50分“卖”给你,要吗? to z_x_b(长弓落日金沙丘)和szgunz(),这么好的东东,我也想要,卖给我不?????? Give Me ,Please! [email protected] to to z_x_b(长弓落日金沙丘).thank u 4 your rsc! you'll earn more points.thank u. Delphi如何实现打印 PPT 文件? 比较难的问题:多文档窗体中子窗体切换时如何消除闪烁现象? 文件播放 如何强制删除正在使用的文件 c++中的“带函数的”struct,对应于pascal的什么类型?? 200分相送! 救命啊!为什么我一打开CSDN的问题就出错!好几天了,以前只是偶尔裸奔一下. 谁知道哪家公司做手机游戏的?贴出公司主页地址,越多越好,帮帮忙吧! 散分,请大家支持我 我是新来的,大家关照我啊! 如何在开机时就禁止键盘,完全进入windows以后,再解开? 征点子,如何卖我的软件.国内怎么做,国外怎么发行,来者有分,回答最好的小妹给一半 获得驱动器问题002
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage('aaa');
end;procedure TForm1.Button2Click(Sender: TObject);
var
a : Tbutton;
begin
a := tbutton.Create(self);;
a.Parent := Form1;
a.Name := 'button3';
a.OnClick := button1.OnClick;
end;end.
var bt1:tbutton;bt1:=tbutton.creat(self);
bt1.paraent:=self;
bt1.left:=...;
bt2.left:=...;
bt2.caption:='...';
bt1.onclick:=myClick;
最后退出时最好记得:
bt1.free;
其中...自己填写,myclick是你写的事件,最好写在这段前面,或者在TYPE中说明!
2、不用DLL直接使用扑克组件;
3、应用程序的自我删除;
4、组件简单动画;
5、暂停程序运行;
6、MessageBox的一些使用技巧;
7、一个经典魔术揭秘;
关于动态拖动控件,暂时没有,以后再说!
详情请看压缩包中的readme.txt!
50分“卖”给你,要吗?
卖给我不??????