A
ajiwuweibin
Unregistered / Unconfirmed
GUEST, unregistred user!
最近碰到一个神奇的问题:Form1弄一个滚动字幕在滚动(TTimer控制Label滚动)当滚动一定时间(比如20分钟)以后,打开Form2,DBGrid的滚动条就看不见,然后打开其他窗口,所有DBGrid的滚动条全部看不见!很简单的几句代码,应该不是代码问题。
procedure TForm1.Timer_rollTimer(Sender: TObject);
begin
if not boo then
Label_roll.Left:= Label_roll.Left+1
else
Label_roll.Left:= Label_roll.Left-1;
if Label_roll.Left+Label_roll.Width> Panel_top.Width-10 then
boo:=true
else
if Label_roll.Left <10 then
boo:=false;
end;
procedure TForm2.FormShow(Sender: TObject);
var
Variant:OleVariant;
begin
form1.SCon.AppServer.SearchData('select * from 物品信息表',Variant);
goodsCds.Data:=Variant;
goodsCds.Active:=true;
end;
procedure TForm1.Timer_rollTimer(Sender: TObject);
begin
if not boo then
Label_roll.Left:= Label_roll.Left+1
else
Label_roll.Left:= Label_roll.Left-1;
if Label_roll.Left+Label_roll.Width> Panel_top.Width-10 then
boo:=true
else
if Label_roll.Left <10 then
boo:=false;
end;
procedure TForm2.FormShow(Sender: TObject);
var
Variant:OleVariant;
begin
form1.SCon.AppServer.SearchData('select * from 物品信息表',Variant);
goodsCds.Data:=Variant;
goodsCds.Active:=true;
end;