Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShowMessage not working via TThread Class

Status
Not open for further replies.

GoldenEye4ever

Programmer
May 26, 2007
20
CA
Hi,

I've developed an app which uses 2 custom TThread classes to perform common tasks (Search, Load).

If I call "ShowMessage(...);", from within the TThread class, the message dialog is usually drawn way too large.
It either expands off the screen horizontally, vertically or both horizontally and vertically.

I'm not sure why this is happening...I've tested this with the most simple TThread class (all it does is: "ShowMessage(...);" then terminates), the problem still happens.

Any help would be greatly appreciated :)
 
you can't act with the VCL within a different thread.
All visual code must be executed from the main thread. to Achieve this you must use the synchronize method (as stated when you create a new TThread class in delphi).

If you don't know what I'm talking about please read this:


It will give you insight how to use threads.

/Daddy



-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top