procedure TForm1.Timer1Timer(Sender: TObject);
begin
image1.Visible :=true;
// image1.Width:=10;
image1.Width:=image1.Width +50;
if image1.Width>500 then
begin
image1.Width :=0;
image1.Visible :=false;
Label1.Caption :='Hello';
label1.Refresh ;
sleepEX(5000,true);
end;
end;
为什么image1.visible:=false;
不能正确执行呢
我的意思是一个 image控件首先自动增加宽度,然后当宽度达到一定时那么这个时候image控件就不可见,此时 label控件显示需要的内容,并且label控件的内容持续显示5″,但是结果确实image达到一定宽度持续显示5″同样的代码在VB中却能正确的执行!!!!
看来delphi真的好差劲啊!!!
begin
image1.Visible :=true;
// image1.Width:=10;
image1.Width:=image1.Width +50;
if image1.Width>500 then
begin
image1.Width :=0;
image1.Visible :=false;
Label1.Caption :='Hello';
label1.Refresh ;
sleepEX(5000,true);
end;
end;
为什么image1.visible:=false;
不能正确执行呢
我的意思是一个 image控件首先自动增加宽度,然后当宽度达到一定时那么这个时候image控件就不可见,此时 label控件显示需要的内容,并且label控件的内容持续显示5″,但是结果确实image达到一定宽度持续显示5″同样的代码在VB中却能正确的执行!!!!
看来delphi真的好差劲啊!!!
解决方案 »
- 看看人家写的考勤工资软件!
- 总共200分:如何用adodataset更新关联表记录
- 急!急!急!DBGrid中的数据导入到XML中后格式是怎样的?
- iis5+d7+iw7,发布不成功的问题
- TADOTable+TDBGridEH+TDataSource中编辑一有关键字的表时,怎样做到避免在输入相同的关键字时的出错?也就是在Post前能检查出?
- 能不能把ADOQuery当成一个临时表来操作?看看这样对不对?
- 我最近打算用Delphi开发一个项目,但有一个难题,大家给出个主意吧!!
- 思路提供:关于excel和数据库
- 如何调用另一个窗口的事件?
- 请问如何捕捉到系统关机各重启???
- 窗体的显示问题: ....各位大哥们都进来LOOK一下.
- 各位兄弟,我的可用分接近负数了,大家帮帮忙啊
begin
image1.Visible :=true;
// image1.Width:=10;
image1.Width:=image1.Width +50;
if image1.Width>500 then
begin
image1.Width :=0;
image1.Visible :=false;
self.Update;
Label1.Caption :='Hello';
label1.Refresh ;
sleepEX(5000,true);
end;
end;
不要自己不会就说Delphi好差劲啊!!!
能不能解释一下为什么要加self.update?
我以前用VC,VB的,delphi还没有看过书,看过了几个程序的代码
现在想不用VB,该用delphi,但是为什么两者的差别这么大呢?
你是个超级笨猪,你不是猪你怎么不解释呢,你别一只半解打肿脸装猪了!!!
臭猪!
begin
image1.Visible :=true;//这一句你在Timer1为真的时候你永远都执行啊!错误就在这一句了!永远都为真啊!笨啊!你有思维吗??????
// image1.Width:=10;
image1.Width:=image1.Width +50;
if image1.Width>500 then
begin
image1.Width :=0;
image1.Visible :=false;
Label1.Caption :='Hello';
label1.Refresh ;
sleepEX(5000,true);
end;
end;