第三方控件PICSHOW怎么使用(50分)

  • 主题发起人 主题发起人 门口
  • 开始时间 开始时间

门口

Unregistered / Unconfirmed
GUEST, unregistred user!
如题
我是一个初学者,请前辈们讲解清楚一点
这里先谢谢
 
几年前用过.
看看它的DEMO,应该不难用吧
 
很多控件都要看它里面带的DEMO的,要不然谁自己就懂得用了?
 
我先试试看吧
 
他的demo写的多好啊
 
N年前用过,就是一个动画切换显示图片的控件吧
 
var
Picturesbot: TStringList;



procedure Tform1.CreateImageList(Path: string);
var
FileList: TFileListBox;
begin
FileList := TFileListBox.Create(Self);
try
FileList.Parent := Self;
FileList.Visible := False;
FileList.Mask := '*.bmp'; // GraphicFileMask(TGraphic);
FileList.Directory := Path;
if FileList.Items.Count > 0 then
begin
Picturesbot.Assign(FileList.Items);
if (Length(Path) > 0) and (Path[Length(Path)] <> '/') then
PicPath := Path + '/'
else
PicPath := Path;
end
else
MessageDlg(Path + #10#13'没有发现标语口号文件',
mtWarning, [mbOK], 0);
finally
FileList.Free;
end;
end;


procedure Tform1.LoadNextImage;
const
CurrentImage: string = '';
var
Index: Integer;
begin
if Picturesbot.Count > 0 then
begin
repeat
Index := Random(Picturesbot.Count);
until (Picturesbot.Count <= 1) or (CurrentImage <> Picturesbot[Index]);
CurrentImage := Picturesbot[Index];
PicShow.Style :=
Random(High(TShowStyle)) + 1; //显示特效风格
PicShow.Picture.LoadFromFile(PicPath + CurrentImage);
end;
end;


procedure Tform1.ShowNextImage;
begin
if Picturesbot.Count = 0 then Exit;
if PicShow.Busy then
begin
PicShow.Stop;
end;
LoadNextImage; //装入下一个图形文件
PicShow.Clear;
PicShow.Update;
PicShow.Execute;
Timer.Interval := ShowPausesec * 1000;
end;

procedure Tform1.TimerTimer(Sender: TObject);
begin
ShowNextImage;
end;

procedure Tform1.FormCreate(Sender: TObject);
begin
if not directoryexists(picpath) then
picpath := ExtractFilePath(Application.ExeName) + 'pic';
Picturesbot := TStringList.Create; //显示图片列表
CreateImageList(picpath);
end;

procedure Tform1.FormDestroy(Sender: TObject);
begin
Picturesbot.Free;
end;
 
呼呼,好累,找到一段N年前的代码
 
谢谢大家,我知道怎么做了,不过我要把分全给xf-wangyi
 
后退
顶部