一个子窗体,想让它在2中方式下执行:
1。正常情况下用户点击一个按钮执行;
2。让用户自己设置在该子窗体的主应用程序启动时或某个指定的时间段执行。
如何实现?请高手指点, 我可是100%揭贴的哦:), 先谢了,急用。
1。正常情况下用户点击一个按钮执行;
2。让用户自己设置在该子窗体的主应用程序启动时或某个指定的时间段执行。
如何实现?请高手指点, 我可是100%揭贴的哦:), 先谢了,急用。
http://puclan.lil.to/
http://donut.nahome.org/pds.htm
http://cafe.daum.net/roomboom
http://bangjh21.eelee.net/ver6/index/index.htm
http://bangjh21.eelee.net/ver6/pds/pds.htm
http://numfam.wo.to
http://mozil.wo.to/
http://www.f2blood2.wo.to/
http://megapass.gampy.com
http://www.only-one.net/
http://!speed.wo.to/
http://www.endless.gg.ro/hehe , 小插曲 :)
1、在主窗体和子窗体uses部分加入IniFiles,var部分加入两个变量
MyIniFile:TIniFile;
FileName:String;2、在你的子窗体上放个CheckBox,Caption为“是否自动运行”,Checked属性为False。开工:
1、在子窗体的关闭事件里写:
FileName:=ExtractFilePath(Paramstr(0))+'MyConfig.ini';
MyIniFile:=TIniFile.Create(FileName);
if CheckBox1.Checked then MyIniFile.WriteInteger('Stat','IsAutoRun',1)
else MyIniFile.WriteInteger('Stat','IsAutoRun',0);
MyIniFile.Destroy;2、在主窗体的创建事件写: var i:integer;
begin
FileName:=ExtractFilePath(Paramstr(0))+'MyConfig.ini';
MyIniFile:=TIniFile.Create(FileName);
i:=MyIniFile.ReadInteger('Stat','IsAutoRun',0);
MyIniFile.Destroy;
if i=1 then 创建子窗体
end;凭印象自己手写的没有测试,如编译不通过发给我。
在application.create時候放入執行
Application.CreateForm(Tfrm_main, frm_main);
Application.CreateForm(TyouNeedForm, youNeedForm);
Application.Run;
或者在main.show中
youNeedForm:=TyouNeedForm.create(self);
youNeedForm.show;