Hello i have a problem for TDBPicShow dbdemo help me pleas

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Hello i have a problem for TDBPicShow dbdemo help me pleas

Postby test111 » August 31st, 2003, 12:05 pm

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
test111
Active Member
Active Member
 
Posts: 5
Joined: August 31st, 2003, 12:03 pm

Postby Kambiz » August 31st, 2003, 2:24 pm

You just need to replace TADOTable with a TTable, that's all.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

hello sorry i have a problem for exemple

Postby test111 » August 31st, 2003, 10:43 pm

hello i have a problem this id and pic =Graphic table

in my soft i have a id and patchpicture = alpha table

in patchpicture i have ptach for images ex:
c:\35874\rep\coll\548752\toto1.jpg for id 1
c:\35874\rep\coll\54785\toto2.jpg for id 2

i not stock picture in table please hel me for modif
test111
Active Member
Active Member
 
Posts: 5
Joined: August 31st, 2003, 12:03 pm

Postby Kambiz » September 1st, 2003, 9:06 am

You have to use TPicShow instead of TDBPicShow.

Code: Select all
if PicShow.Busy then PicShow.Stop;
PicShow.Picture.LoadFromFile(PathToPicField.Value);
PicShow.Execute;

Use the above code when record is changed.

Cheers,
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

thanks please ypu have a demo

Postby test111 » September 1st, 2003, 11:35 am

hello you have a demo for this modification
test111
Active Member
Active Member
 
Posts: 5
Joined: August 31st, 2003, 12:03 pm

Postby Kambiz » September 1st, 2003, 3:53 pm

I don't have the demo.

You just need to replace the TDBPicSHow control with TPicShow and write the above code inside the OnDataChange event of the DataSource.

Please try it.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

modification demo

Postby test111 » September 1st, 2003, 4:20 pm

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
test111
Active Member
Active Member
 
Posts: 5
Joined: August 31st, 2003, 12:03 pm

Postby Kambiz » September 1st, 2003, 5:01 pm

You should modify the DB Demo.

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.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

ok for modif and not have posibility DBPicShowBeforeLoadPict

Postby test111 » September 1st, 2003, 5:27 pm

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;
test111
Active Member
Active Member
 
Posts: 5
Joined: August 31st, 2003, 12:03 pm

Postby Kambiz » September 1st, 2003, 5:36 pm

No, there is not such a feature.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: Bing [Bot] and 1 guest