multithreading - Why my Thread run after Form creation? -


I have a project after main form my threads has been made . But this code does not work correctly:

  Type TMyThread = class (TThread) executed public process; Override; Process duplicates; End; { type } . . . Process TForm1.FormCreate (Sender: TObject); Var thrd: TMyThread; Start Thrd: = TMyThread.Create (True); Thrd.Resume; // The following code will tell about 5 seconds to show the time delay of `form '... end; . . . TMyThread.Execute Process; Heritage begins; DoProc; End; Process TMyThread.doProc; Warfare: TIFR; Start AForm: = TForm.Create (zero); AForm.Caption: = 'Thread form'; Forearm Position: = POSCREENCENTRE; Forum.formstyle: = fstaonoptop; AForm.Show; End; I do not want to use the  synchronize . One way to exclude my  threads  from the main code is 
? When showing main form , I want to show the form before the main form . <

class = "post-text" itemprop = "text">

Mohammed, I think the total [multithreading] Misunderstanding is an excellent example.

It is always good that you experiment with your code, but you should learn the basics. As David said, you are breaking the rules. The whole concept you can be disappointed for a thousand times because you can not work code, but VCL not will suddenly become thread-protected due to your disappointment.

My suggestion would be an excellent one.

A book by Martin Harvey, is fun for real and real geeks to read. You do not want to move beyond mutex, important sections and concurrency control, but at least you will learn some important concepts about the amazing world of multithreading.

Please do not expect answers from anyone here. Wrong questions Most respondents are professional and experienced programmers and they do not want to waste their time, which are wrong in the beginning. People here are quite boolean;)

In other words, try to learn some very basic things before posting your questions.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -