Posted: 31/08/03 12:05 Post subject: Hello i have a problem for TDBPicShow dbdemo help me pleas
sorry for my english im french do you speak french ????
please i have a problem for dbdemo TDBPicShow
the demo is conected for access database ans read picture in the database in my soft i have a patch for picture in my b ase please help me for change code
-----
bonjour j'ai un probleme avec le fichier de dbdemo du composant TDBPicShow
dans l'exemple vous aceder a une base accs dont le cham stoque l'image dans lmage dans la base
dans mon programme je ne stoque dans la base que le chemin d'acces aux images car je traite une tres grande quantité d'images pouriez vous m'indiquer les modif a faire pour que cela fonctionne
a titre indicatif j'utilise un table paradox merci d'avance
Posted: 01/09/03 16:20 Post subject: modification demo
hello i have change source code for patch
procedure TMainForm.ShowNextImage;
begin
Timer.Enabled := False;
// if there is not any image in the list exit
if Pictures.Count = 0 then Exit;
// if PicShow is playing, stops it
if PicShow.Busy then
PicShow.Stop;
// Sets the animation style according to user sellection
if RandomStyle.Checked then
Style.Value := Random(High(TShowStyle))+1
else if TurnStyle.Checked then
if Style.Value < High(TShowStyle) then
Style.Value := Style.Value + 1
else
Style.Value := 1;
// Updates image name status
ShownImage := LoadedImage;
PicShow.Picture.LoadFromFile(table1.FieldByName('Photo_min1').Value);
RunningFilename.Update;
// Begins the animation
PicShow.Execute;
end;
and
// Selects randomly an image from the image list and loades it into PicShow
procedure TMainForm.LoadNextImage;
var
Index: Integer;
begin
LoadedImage := EmptyStr;
if Pictures.Count > 0 then
begin
repeat
Index := Random(Pictures.Count);
until (Pictures.Count <= 1) or (ShownImage <> Pictures[Index]);
LoadedImage := Pictures[Index];
PicShow.Picture.LoadFromFile(table1.FieldByName('Photo_min1').Value);
end;
NextFilename.Caption := 'Next: ' + (table1.FieldByName('Photo_min1').Value);
NextFilename.Update;
end;
i have a problem the patch for picture is ok
the id of the table not change
the picture not change and in the table not change id
If you modify the DB Demo as I described in my last post, when the user changes the current record the PicShow's image changes to the cirrent record's image.
Posted: 01/09/03 17:27 Post subject: ok for modif and not have posibility DBPicShowBeforeLoadPict
in the tpicshow not have a posibility for increment style transition
procedure TMainForm.DBPicShowBeforeLoadPicture(Sender: TObject);
begin
// Sets the animation style according to the user selection
if RandomStyle.Checked then
Style.Value := Random(High(TShowStyle))+1
else if TurnStyle.Checked then
if Style.Value < High(TShowStyle) then
Style.Value := Style.Value + 1
else
Style.Value := 1;
// Clears background if it is required
if ClearOldImage.Checked then
begin
DBPicShow.Clear;
DBPicShow.Update;
end;
end;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum