Recommendation indy and trichview

General TRichView support forum. Please post your questions here
Post Reply
aussie
Posts: 5
Joined: Thu May 08, 2008 7:41 pm

Recommendation indy and trichview

Post by aussie »

Dear Sergey,
i would like to ask you some questions i am using indy 10 with codegear 2007 and improving project like msn (but will be private program which are between 10 companies) we will have to use trichview as a richedit and i found great example which you gave your example folder and interested autocomplate word which translate from text to image emotion using imagelist can i do same thing between two remote computer
for example number1 computer will send via indy stream which contain trichviewedit stream (include anim gif+string) and receive computer2 indy readstream and if computer2 got the indy stream from comp1 can computer2 insert to richview(readstream) to view anim gif+string ?


are the way like to do ?

1st) trichview write stream (comp1 sender)
2nd) indy write stream (comp1 sender)
3rd) indy readstream (comp2 receiver)
4th) richview readstream (comp2 receiver)


i would like to listen your recommendation thanks
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you want to implement chat, may be it makes sense to send plain text strings between computers, then on target computer replace emoticons codes with images when insering in TRichView?
Text can be entered in TEdit, example can be found here: http://www.trichview.com/forums/viewtopic.php?t=63
aussie
Posts: 5
Joined: Thu May 08, 2008 7:41 pm

Post by aussie »

yes now i do same thing as you told me but i meant

compt1 (sender) does have animgif.gif which will send to compt2
compt2 (receiver) does not have animgif.gif anim gif so how can i do this with stream+string ? i have to send (image+string) at the same time from comp1 to comp2 to view richview1 both string and image



(comp1 have image+string)
1st) trichview(edit) savervf tempfile.rvf (gif+string) (comp1 sender)
2nd) send this tempfile.rvf file include+image+string to compt2 via indy(comp1 sender)
3rd) indy readstream trichview rvf file and put temp folder tempfile.rvf(comp2 receiver)
4th) (richview) load rvf and view tempfile.rvf (comp2 receiver)
5th) delete tempfile.rvf

for every message can i do like this ?
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It's not necessary to create temporary files, you can use SaveRVFToStream/LoadRVFFromStream to write/read from stream.
And, as far as I understand how it works, you will need to invent some kind of transfer protocol, so that your applications will understand what is received.
aussie
Posts: 5
Joined: Thu May 08, 2008 7:41 pm

Post by aussie »

thanks sergey i´ll do.
I saw your example about emotion replacement from imagelist but i couldnt fine replace charachter from localdriver for example
c:\anim\0.gif :)
c:\anim\1.gif :(
c:\anim\2.gif :|

how can i replace charachter from those file ? any simple code you have ?
Sergey Tkachenko
Site Admin
Posts: 17534
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The chat example from that topic ( http://www.trichview.com/forums/viewtopic.php?t=63 ) loads emoticons from files. It loads from bitmaps, but you can load gifs instead, just change TBitmap to TGifImage.
This demo is configurable - you can define your own codes for emoticons and your own graphic files, just change CreateEmoticons procedure.
Post Reply