Use standard normal delphi properties and events.
In a structured design the datamodule sits at the top
of the tree - every other item knows it but it doesn't
know about them.
a typical datamodule has
property Connected : boolean read GetConnected write
SetConnected
property OnConnect : TNotifyEvent read FOnConnect
write FOnConnect
implmentation
function MyDatamodule.GetConnected : boolean;
begin
result := Database.Connected;
end;
procedure MyDatamodule.SetConnected(Value : boolean);
begin
Database.Connected := Value;
end;
Your program can then call
MyDataModule.Connected := true;
procedure MyDatamodule.OnDbConnect(Sender : TObject);
begin
if Assigned(OnConnected) then
OnConnected(self);
end;
and so on
Mick
From: "Mhd. Monir AlSabbagh" [EMAIL PROTECTED]
Date: Mon May 22, 2006 4:15am(PDT)
Subject: Sending WM message to TDataModule
Hi,
Usually I send wm messages to TForm this way:
PostMessage(Form1.Handle, WM_MY_DEFFIND_MESSAGE, 0,
0);
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.
____________________________________________________
On Yahoo!7
360°: Your own space to share what you want with who you want!
http://www.yahoo7.com.au/360
-----------------------------------------------------
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
- Visit your group "delphi-en" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

