How to send windows messages to non-main forms

Posted by Chris on Stack Overflow See other posts from Stack Overflow or by Chris
Published on 2010-05-19T13:14:14Z Indexed on 2010/05/19 13:40 UTC
Read the original article Hit count: 304

Filed under:
|

How do I go about sending a Windows Message to a form in my application that is not the MainForm? Using the code below gives me an Access Violation.

procedure TMainForm.SendMessageToAnotherForm;
begin
  SendMessage(MyForm.Handle,WM_MY_MESSAGE,0,0);
end;

MyForm has already been created and is the top most window.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-7