Try the following steps:
1) Add a TApplicationEvents control to your datamodule.
2) Add code to the OnMessage event of this TApplicationEvents that should
check if it received the message you want to process and process the
message.
3) Send/PostMessage your message to the Application.Handle instead.

This is the quick-and-dirty method. If you want your datamodule to behave
like a windowed control, then well... Then don't use a datamodule...



--
With kind regards,

\/\//\ Wim,
W.A. ten Brink

On 5/22/06, Mhd. Monir AlSabbagh <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Usually I send wm messages to TForm this way:
>
> PostMessage(Form1.Handle, WM_MY_DEFFIND_MESSAGE, 0, 0);
>
> and in Form1 I receive the message this way:
>
> procedure WMMyDeffindMessage(var AMsg: TMessage); message
> WM_MY_DEFFIND_MESSAGE;
>
> Now I need to post the message to TDataModule not to TForm, since
> there is NO Handle in TDataModule, how can I send a message to
> TDataModule?
>
> Thank you for your help.
>
> Monir.
>
>
>
>
>
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]




SPONSORED LINKS
C programming language Computer programming languages Java programming language
The c programming language C programming language Concept of programming language


YAHOO! GROUPS LINKS




Reply via email to