home *** CD-ROM | disk | FTP | other *** search
- unit RecvMsg;
- {(C) Alex Demchenko(alex@ritlabs.com)}
-
- interface
-
- uses
- Windows, Messages, Classes, Graphics, Controls, Forms,
- StdCtrls, ComCtrls, SendMsg;
-
- type
- TRecvMsgForm = class(TForm)
- Button1: TButton;
- Button2: TButton;
- RichEdit1: TRichEdit;
- procedure Button2Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- FSource: String;
- end;
-
- var
- RecvMsgForm: TRecvMsgForm;
-
- implementation
-
- {$R *.dfm}
-
- procedure TRecvMsgForm.FormClose(Sender: TObject;
- var Action: TCloseAction);
- begin
- Action := caFree;
- end;
-
- procedure TRecvMsgForm.Button1Click(Sender: TObject);
- begin
- with TSendMsgForm.Create(nil) do
- begin
- Caption := 'Send message to: ' + FSource;
- FDest := FSource;
- Show;
- end;
- Close;
- end;
-
- procedure TRecvMsgForm.Button2Click(Sender: TObject);
- begin
- Close;
- end;
-
- end.
-