Home > Back-end >  RichView DOC
RichView DOC

Time:10-10

Procedure TForm49. BtnOpenClick (Sender: TObject);
Var
R: Boolean;
The begin
If not opendialog1. Execute then
exit;
RichViewEdit1. The Clear;
RichViewEdit1. Format;
RichViewEdit1. Update;
RichViewEdit1. The Clear;
If opendialog1. FilterIndex=1 then
R:=RichViewEdit1 LoadRTF (opendialog1 FileName)
The else
The begin
R:=RVOfficeConverter1 ImportRV (opendialog1 FileName, RichViewEdit1,
Opendialog1. FilterIndex - 1);
end;
If not then r
Application. MessageBox (' mistakes', 'an error occurred while trying to import, 0).
RichViewEdit1. Format;
RichViewEdit1. SetFocus;
end;

Procedure TForm49. BtnSaveClick (Sender: TObject);
Var
R: Boolean;
The begin
If not SaveDialog1. Execute then
exit;
If SaveDialog1. FilterIndex=1 then
//r:=RVOfficeConverter1. SaveRTF (SaveDialog1 FileName, False);
R:=RVOfficeConverter1 ExportRTF (SaveDialog1 FileName,
SaveDialog1. FilterIndex - 2)
The else
The begin
R:=RVOfficeConverter1 ExportRV (SaveDialog1 FileName, RichViewEdit1,
SaveDialog1. FilterIndex - 2);
//r:=RVC. ExportRTF (Save FileName, Save the FilterIndex - 2);
end;
If not then r
Application. MessageBox (' Error 'and' Error ', 0)
The else
Application. MessageBox (' successfully saved! ', 'prompt', 0);
RichViewEdit1. SetFocus;
end;

Procedure TForm49. FormCreate (Sender: TObject);
The begin
Opendialog1. Filter:=RVOfficeConverter1. GetImportFilter;
SaveDialog1. Filter:=RVOfficeConverter1. GetImportFilter;
end;

CodePudding user response:

Procedure TForm49. BtnOpenClick (Sender: TObject);
Var
R: Boolean;
The begin
If not opendialog1. Execute then
exit;
RichViewEdit1. The Clear;
RichViewEdit1. Format;
RichViewEdit1. Update;
RichViewEdit1. The Clear;
If opendialog1. FilterIndex=1 then
R:=RichViewEdit1 LoadRTF (opendialog1 FileName)
The else
The begin
R:=RVOfficeConverter1 ImportRV (opendialog1 FileName, RichViewEdit1,
Opendialog1. FilterIndex - 1);
end;
If not then r
Application. MessageBox (' mistakes', 'an error occurred while trying to import, 0).
RichViewEdit1. Format;
RichViewEdit1. SetFocus;
end;

Procedure TForm49. BtnSaveClick (Sender: TObject);
Var
R: Boolean;
The begin
If not SaveDialog1. Execute then
exit;
If SaveDialog1. FilterIndex=1 then
//r:=RVOfficeConverter1. SaveRTF (SaveDialog1 FileName, False);
R:=RVOfficeConverter1 ExportRTF (SaveDialog1 FileName,
SaveDialog1. FilterIndex - 2)
The else
The begin
R:=RVOfficeConverter1 ExportRV (SaveDialog1 FileName, RichViewEdit1,
SaveDialog1. FilterIndex - 2);
//r:=RVC. ExportRTF (Save FileName, Save the FilterIndex - 2);
end;
If not then r
Application. MessageBox (' Error 'and' Error ', 0)
The else
Application. MessageBox (' successfully saved! ', 'prompt', 0);
RichViewEdit1. SetFocus;
end;

Procedure TForm49. FormCreate (Sender: TObject);
The begin
Opendialog1. Filter:=RVOfficeConverter1. GetImportFilter;
SaveDialog1. Filter:=RVOfficeConverter1. GetImportFilter;
end;
  • Related