home *** CD-ROM | disk | FTP | other *** search
- unit r2hform;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, Buttons, FileCtrl, r2hconv;
-
- type
- TForm1 = class(TForm)
- DirectoryListBox1: TDirectoryListBox;
- FileListBox1: TFileListBox;
- DriveComboBox1: TDriveComboBox;
- ConvBtn: TBitBtn;
- ExitBtn: TBitBtn;
- procedure DirectoryListBox1Change(Sender: TObject);
- procedure DriveComboBox1Change(Sender: TObject);
- procedure ConvBtnClick(Sender: TObject);
- procedure FileListBox1DblClick(Sender: TObject);
- private
- { Private-Deklarationen }
- public
- { Public-Deklarationen }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.DirectoryListBox1Change(Sender: TObject);
- begin
- FileListBox1.Directory := DirectoryListBox1.Directory;
- end;
-
- procedure TForm1.DriveComboBox1Change(Sender: TObject);
- begin
- DirectoryListBox1.Drive := DriveComboBox1.Drive;
- FileListBox1.Directory := DirectoryListBox1.Directory;
- end;
-
- procedure TForm1.ConvBtnClick(Sender: TObject);
- var
- i : integer;
- dest : string;
-
- begin
- i := length(FileListBox1.FileName);
- if i > 0 then
- begin
- dest := Copy(FileListBox1.FileName, 1, i-3) + 'htm';
- Form1.Caption := 'Konvertiere ' + FileListBox1.FileName + '.....';
- r2hconv.rtf2html(FileListBox1.FileName, dest, ['']);
- Form1.Caption := FileListBox1.FileName + ' konvertiert.';
- end;
- end;
-
- procedure TForm1.FileListBox1DblClick(Sender: TObject);
- var
- i : integer;
- dest : string;
-
- begin
- i := length(FileListBox1.FileName);
- if i > 0 then
- begin
- dest := Copy(FileListBox1.FileName, 1, i-3) + 'htm';
- Form1.Caption := 'Konvertiere ' + FileListBox1.FileName + '.....';
- r2hconv.rtf2html(FileListBox1.FileName, dest, ['']);
- Form1.Caption := FileListBox1.FileName + ' konvertiert.';
- end;
- end;
-
- end.
-