AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Basic TThread doesn't work

Ein Thema von FaNIX · begonnen am 1. Feb 2008 · letzter Beitrag vom 1. Feb 2008
 
FaNIX

Registriert seit: 8. Okt 2007
36 Beiträge
 
#5

Re: Basic TThread doesn't work

  Alt 1. Feb 2008, 08:26
Zitat von Luckie:
When you call Synchronize the related code runs in the main forms context. In your case DoIt doesn't run in the context of the thread but in the context of your main form. You shoukd only call Synchronize if you want to access your main form for updating displayed data.
Ahh ok, I see what you meen. But how would I update a label on the main form when calling a method inside the thread with Syncronize? Do i need to include the Mainform unit in my TThread and then access the components from there? Something like form1.label.caption := 'Test'. I'm not sure if that is a nice way of doing it, unless there is another way?

Thanks...
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:06 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz