我在show一个form后,进行了数据库连接的动作,结果form上的东东根本显示不了,cpu的时间全部用在了数据库连接上,难道这也要写一个多线程吗?下面是我的code,请大家给点主意先。
WaitForm:=TWaitForm.Create(self);
WaitForm.BorderStyle := bsNone;
WaitForm.Show;
SetDBAgent;
....
WaitForm:=TWaitForm.Create(self);
WaitForm.BorderStyle := bsNone;
WaitForm.Show;
SetDBAgent;
....
WaitForm.BorderStyle := bsNone;
WaitForm.Show; WaitForm.Update; SetDBAgent;
Oncreate 和 OnShow里的代码。