我想问一个progressbar控件的使用问题。(60分)

  • 主题发起人 主题发起人 xiaoxiami2
  • 开始时间 开始时间
X

xiaoxiami2

Unregistered / Unconfirmed
GUEST, unregistred user!
我的程序打开之前有一个欢迎画面,我想在这个画面上放一个progressbar,当progressbar填满时登陆界面出现,怎么办啊?请看我的程序初始的代码!
begin
Application.Initialize;
welcome:=twelcome.create(application);
welcome.Show;
welcome.Update;
Application.Title := '企业及时通';
Application.CreateForm(Tdenglu, denglu);
Application.CreateForm(TDataModule7, DataModule7);
Application.CreateForm(TDataModule23, DataModule23);
Application.CreateForm(Tcaigou_hetong_yulan, caigou_hetong_yulan);
Application.CreateForm(Tcaigou_peibodan, caigou_peibodan);
Application.CreateForm(Tkufang_jie_tiao, kufang_jie_tiao);
Application.CreateForm(Tzhuce, zhuce);
Application.CreateForm(Truanjianshengming, ruanjianshengming);
Application.CreateForm(Tceo_qq, ceo_qq);
Application.CreateForm(Tzaixianyonghu, zaixianyonghu);
Application.CreateForm(Ttianjiayonghu, tianjiayonghu);
Application.CreateForm(Tfasongxiaoxi, fasongxiaoxi);
Application.CreateForm(Tcaigou_bijia, caigou_bijia);
Application.CreateForm(TForm6, Form6);
Application.CreateForm(Tgong_shi_ban, gong_shi_ban);
Application.CreateForm(Tjihua_shenqing, jihua_shenqing);
Application.CreateForm(Tjihua_shenpi, jihua_shenpi);
Application.CreateForm(Tcaigou_hetong_qianding1, caigou_hetong_qianding1);
Application.CreateForm(Tcaigou_jihua1, caigou_jihua1);
Application.CreateForm(Tkufang_1234, kufang_1234);
Application.CreateForm(Tkufang_panku_baogao, kufang_panku_baogao);
Application.CreateForm(Tkufang_dae_kucun, kufang_dae_kucun);
Application.CreateForm(Tkufang_kucun_chaxun1, kufang_kucun_chaxun1);
Application.CreateForm(Twenjian_pifu, wenjian_pifu);
Application.CreateForm(Tqq_shezhi, qq_shezhi);
Application.CreateForm(Tcaiwu_jiesuan, caiwu_jiesuan);
Application.CreateForm(Tjihua_pifu1, jihua_pifu1);
Application.CreateForm(Tkufang_rukudan, kufang_rukudan);
Application.CreateForm(Tkufang_zhangye, kufang_zhangye);
Application.CreateForm(Twodechuanzhen, wodechuanzhen);
Application.CreateForm(Tfasongduanxin, fasongduanxin);
Application.CreateForm(Tkucanshangxiaxian, kucanshangxiaxian);
Application.CreateForm(Tshichang_zhunru, shichang_zhunru);
Application.CreateForm(Tshichang_zhunru1, shichang_zhunru1);
Application.CreateForm(Tshichang_zhunru2, shichang_zhunru2);
Application.CreateForm(Tshichang_zhunru3, shichang_zhunru3);
Application.CreateForm(Tshichang_zhunru4, shichang_zhunru4);
Application.CreateForm(Tgonghuo_shang_guanli, gonghuo_shang_guanli);
Application.CreateForm(Tkehu_fuwu_xinxi, kehu_fuwu_xinxi);
Application.CreateForm(Thetong_jiesuan_shenpi, hetong_jiesuan_shenpi);
Application.CreateForm(Tcaiwu_baogao, caiwu_baogao);
Application.CreateForm(Tcaigou_bijia_suo_sou, caigou_bijia_suo_sou);
Application.CreateForm(Tjvjiwenjian, jvjiwenjian);
Application.CreateForm(Tchangliwenjian, changliwenjian);
Application.CreateForm(Tgongzuoanpai, gongzuoanpai);
Application.CreateForm(Tbangzhu, bangzhu);
Application.CreateForm(Tbianmachaxun, bianmachaxun);
Application.CreateForm(Tpankushijian, pankushijian);
Application.CreateForm(Tbianmachaxun1, bianmachaxun1);
welcome.Hide;
welcome.Free;
Application.Run;
end.
 
天哪,这是一开始把所有的窗体都显示出来了吗?
 
没办法了,只好在每一句Application.CreateForm....的后面
使用
Welcome.Progressbar1.StepIt;
Welcome.Update;
别忘了在最前面根据待创建Form的多少给Welcome.Progressbar1.max
赋值。
另外,最好Form不要用自动创建,这样多慢啊,大的工程还不把人等
的累死,而且据我的经验,大工程这样做的后果可能就是Delphi本身
崩溃。
除了数据模块和其它关键性模块外,最好都用动态创建与释放。
 
接受答案了.
 
后退
顶部