DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hello i have a problem for TDBPicShow dbdemo help me pleas

 
   Reply to topic    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
test111
Member


Joined: 31 Aug 2003
Posts: 5

PostPosted: 31/08/03 12:05    Post subject: Hello i have a problem for TDBPicShow dbdemo help me pleas Reply with quote

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
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 207

PostPosted: 31/08/03 14:24    Post subject: Reply with quote

You just need to replace TADOTable with a TTable, that's all.


ParadoxPSDemo.zip
 Description:
TDBPicShow demo using a Paradox table.

Download
 Filename:  ParadoxPSDemo.zip
 Filesize:  104.01 KB
 Downloaded:  18 Time(s)

Back to top
View user's profile Send e-mail Visit poster's website
test111
Member


Joined: 31 Aug 2003
Posts: 5

PostPosted: 31/08/03 22:43    Post subject: hello sorry i have a problem for exemple Reply with quote

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
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 207

PostPosted: 01/09/03 09:06    Post subject: Reply with quote

You have to use TPicShow instead of TDBPicShow.

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

Use the above code when record is changed.

Cheers,
Kambiz
Back to top
View user's profile Send e-mail Visit poster's website
test111
Member


Joined: 31 Aug 2003
Posts: 5

PostPosted: 01/09/03 11:35    Post subject: thanks please ypu have a demo Reply with quote

hello you have a demo for this modification
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 207

PostPosted: 01/09/03 15:53    Post subject: Reply with quote

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.
Back to top
View user's profile Send e-mail Visit poster's website
test111
Member


Joined: 31 Aug 2003
Posts: 5

PostPosted: 01/09/03 16:20    Post subject: modification demo Reply with quote

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
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 207

PostPosted: 01/09/03 17:01    Post subject: Reply with quote

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.
Back to top
View user's profile Send e-mail Visit poster's website
test111
Member


Joined: 31 Aug 2003
Posts: 5

PostPosted: 01/09/03 17:27    Post subject: ok for modif and not have posibility DBPicShowBeforeLoadPict Reply with quote

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;
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 207

PostPosted: 01/09/03 17:36    Post subject: Reply with quote

No, there is not such a feature.
Back to top
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
   Reply to topic    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group