indy Activex Thread issues
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Re: indy Activex Thread issues
yes memo storing command , but how ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: indy Activex Thread issues
also why when i make the memo not visible the application lagging too much ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: indy Activex Thread issues
Hi again...
I downloaded your project, done some changes.
Client project attached this message...
Just do search below text in the source.
between
There is no reasonable thing I found.
So do you have more question, go ahead from this point.
The reason of lagging may be this section
I downloaded your project, done some changes.
Client project attached this message...
Just do search below text in the source.
Kod: Tümünü seç
// --- Changed begin --- //
Kod: Tümünü seç
// --- Changed end --- //
So do you have more question, go ahead from this point.
Kod: Tümünü seç
procedure Ttestthreading.TCPClientConnected(Sender: TObject);
begin
// --- Changed begin --- //
ListeningThread := TReadingThread.Create( TCPClient, ReceivedMemo.Lines );
// --- Changed end --- //
SendCommandWithParams(TCPClient, 'LOGIN', edPass.Text + Sep);
end;
Kod: Tümünü seç
procedure Ttestthreading.FormShow(Sender: TObject);
begin
Memo1.Clear;
// --- Changed begin --- //
ReceivedMemo.Clear;
ReceivedMemo.Visible := False;
// --- Changed end --- //
end;
Kod: Tümünü seç
// --- Changed begin --- //
Command := Trim(Command);
// --- Changed end --- //
Kod: Tümünü seç
// --- Changed begin --- //
procedure Ttestthreading.ReceivedMemoChange(Sender: TObject);
begin
// Synchronized / Incoming Message Event is Here...
if ReceivedMemo.Text <> '' // two lines later we do not want to trigger again with cleartext...
then ProcessCommands( ReceivedMemo.Lines.Text );
ReceivedMemo.Lines.Clear;
end;
// --- Changed end --- //
- Dosya ekleri
-
- client.rar
- (14.33 KiB) 193 kere indirildi
Re: indy Activex Thread issues
You are awesome Thank you very much , one thing left to understand every thing how possibly command added to ReceivedMemo ? i mean how its add the sended commands ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: indy Activex Thread issues
Thank you
- FLogResult is a TStrings property. When you create this thread by setting by a Memo's TStrings property ( here Memo.Lines property ) thats pointer automatically ties to the inside the thread.
- When thread makes changes to the FLogResult, at same time this changing value triggers the Memo's OnChange event.
- We can catch this text by this event so.
- I designed that thread class with this capability by adding a property named FLogResult.@mia yazdı: one thing left to understand every thing how possibly command added to ReceivedMemo ? i mean how its add the sended commands ?
- FLogResult is a TStrings property. When you create this thread by setting by a Memo's TStrings property ( here Memo.Lines property ) thats pointer automatically ties to the inside the thread.
- When thread makes changes to the FLogResult, at same time this changing value triggers the Memo's OnChange event.
- We can catch this text by this event so.
Kod: Tümünü seç
type
TReadingThread = class(TThread)
protected
FConnection : TIdTCPConnection;
FLogResult : TStrings;
procedure Execute; override;
public
constructor Create(AConn: TIdTCPConnection; ALogResult: TStrings); reintroduce;
end;
Kod: Tümünü seç
ListeningThread := TReadingThread.Create( TCPClient, ReceivedMemo.Lines );
Re: indy Activex Thread issues
you are a genius , you cannot imagen how much time i spend about 1 year to find an equation and solve the problem and here you are you solve every thing ,, i hope that i know this forums from many years , iam really thankful to know such a guy like you Thank you Mrmarman to make life easy and understandable . Solved
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: indy Activex Thread issues
Thank you, with my pleasure.
I enjoyed to work with this project. You also been helpful for forum, that the forum also needs this example.
I enjoyed to work with this project. You also been helpful for forum, that the forum also needs this example.
Re: indy Activex Thread issues
Dead link
Please Update link download OCX activex. Thank you
Please Update link download OCX activex. Thank you