I'm new to using threads and have a couple of simple (i think!) questions!
1) I'm following an example that uses that posts message back to the form when valid data has been assigned a shared memory resource. In the main form unit it has:
WM_DATA_IN_BUF = WM_APP + 1000;
procedure HandleNewData(var Message: TMessage); message WM_DATA_IN_BUF;
and the thread then has:
PostMessage(PrimeFrm.Handle, WM_DATA_IN_BUF, 0, 0);
Am I correct in my understanding that the value '1000' used can be any value as long as i havent used it before?
2) The example also has:
TPrimeFrm = class(TForm)
property StringBuf: TStringList read FStringBuf write FStringBuf;
I'm not to sure that I understand the relationship between FstringBuf and stringBuf? Is this basically saying that there is a private property FstringBuf that the to the 'world outside' the form can be read and written to using StringBuf? If thats the case what is the advantage? Why 'F' StringBuf.
3) I have a thread that requires several tbitmap and Tmemorystream variables. I was going to declare and initialise these in the thread's .execute event, but I was wondering whether there was an oncreate event and whether I could initialise them there? I'm new to multithreaded programming so I thought I would ask before trying incase there are any problems that would not be apparent.