delphi中使用多个image控件显示图像问题 20
delphi中使用多个image控件显示图像,从硬盘中读取图像,但是显示的时候是顺序一张张的显示,而不是同步,怎么解决多个image控件显示图像同步问题...谢谢unit...
delphi中使用多个image控件显示图像,从硬盘中读取图像,但是显示的时候是顺序一张张的显示,而不是同步,怎么解决多个image控件显示图像同步问题...谢谢
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
image1.Picture.LoadFromFile('1.jpg');
image2.Picture.LoadFromFile('2.jpg');
image3.Picture.LoadFromFile('3.jpg');
image4.Picture.LoadFromFile('4.jpg');
image1.Visible:=true;
image2.Visible:=true;
image3.Visible:=true;
image4.Visible:=true;
end;
end.
如果是用多线程...4个image同时显示该怎麼写呢? 展开
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, StdCtrls, Buttons;
type
TForm1 = class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
image1.Picture.LoadFromFile('1.jpg');
image2.Picture.LoadFromFile('2.jpg');
image3.Picture.LoadFromFile('3.jpg');
image4.Picture.LoadFromFile('4.jpg');
image1.Visible:=true;
image2.Visible:=true;
image3.Visible:=true;
image4.Visible:=true;
end;
end.
如果是用多线程...4个image同时显示该怎麼写呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询