home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: Shareware for Win 95
/
Chip-Shareware-Win95.bin
/
ostatni
/
delphi
/
ruzne
/
rzcomps.exe
/
DEMO
/
MAILFRM.PA_
/
MAILFRM.PA
Wrap
Text File
|
1996-10-18
|
1KB
|
73 lines
unit Mailfrm;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, RzSndMsg, RzLabel;
type
TFrmMail = class(TForm)
Label1: TLabel;
Label2: TLabel;
GroupBox1: TGroupBox;
EdtTO: TMemo;
EdtCC: TMemo;
LstFiles: TListBox;
BtnBrowse: TButton;
EdtMessage: TMemo;
EdtSubject: TEdit;
Msg: TRzSendMessage;
BtnSend: TButton;
Label3: TLabel;
DlgOpen: TOpenDialog;
BtnRemove: TButton;
BtnDone: TButton;
RzLabel1: TRzLabel;
RzLabel2: TRzLabel;
procedure BtnSendClick(Sender: TObject);
procedure BtnBrowseClick(Sender: TObject);
procedure BtnRemoveClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmMail: TFrmMail;
implementation
{$R *.DFM}
procedure TFrmMail.BtnSendClick(Sender: TObject);
begin
Msg.Attachments := LstFiles.Items;
Msg.ToRecipients := EdtTO.Lines;
Msg.CcRecipients := EdtCC.Lines;
Msg.Send;
{ Clear all fields }
EdtTo.Clear;
EdtCC.Clear;
EdtSubject.Clear;
EdtMessage.Clear;
LstFiles.Clear;
end;
procedure TFrmMail.BtnBrowseClick(Sender: TObject);
begin
if DlgOpen.Execute then
LstFiles.Items.Add( DlgOpen.FileName );
end;
procedure TFrmMail.BtnRemoveClick(Sender: TObject);
begin
if LstFiles.ItemIndex <> -1 then
LstFiles.Items.Delete( LstFiles.ItemIndex );
end;
end.