Friday, October 5, 2007

How to run the program

How to run the program

To run the program

Step 1

To run the program, first, you need to press the F9 to run the program.

Step 2

  1. Open file is functioning to open the file.

  2. Font is functioning to change the Font type.

  3. Save File is functioning to save the file

Edited By: Norasyikin Mahmud

© 2001 ISC

All rights reserved. All other product names and trademarks are registered properties of their respective owners.

301001

How to program with the SaveDialog

How to program with the SaveDialog

To program with the SaveDialog

Step 1

To program with SaveDialog, first, double click the Save File button.

Step 2

Next, it will display a Code Explore window and you need to enter the programming inside it.

Step 3

Program:

procedure TForm1.SaveAs1Click(Sender:TObject);

begin

savedialog1.filename:=tFilename;

if SaveDialog1.Execute then

Begin

tFilename:=SaveDialog1.Filename;

Caption:=ExtractFileName(tFilename);

SaveFileClick(sender);

end;

end;

procedure TForm1.SaveFileClick(Sender: TObject);

begin

if OpenDialog1.FileName <> '' then

Begin

Memo1.Lines.SaveToFile(OpenDialog1.Filename);

End

else

SaveAs1Click(sender)

end;

end.

Tips:

and

How to work with SaveDialog

How to work with SaveDialog

To work with SaveDialog

Step 1

To work with SaveDialog, first, you need to add the Button and SaveDialog in the Form.

The Button1 properties is Name: SaveFile, Caption: Save File.

Step 2

Example:

In the SaveDialog properties click the Filter

In the Filter Editor type int.

->

How to work with FontDialog

How to work with FontDialog

To work with FontDialog

Step 1

If you wish to work with FrontDialog, first you need to add the Button and OpenDialog in the Form. The Button1 properties is Name: Set Font, Caption: Font.

Example:

Step 2

Next, you have to double click the Font button and it will display a Code Explore window. Later, enter the programming inside it.

Step 3

Program:

procedure TForm1.SetFontClick(Sender: TObject);

begin

FontDialog1.Font:=Memo1.Font;

if FontDialog1.Execute then

Memo1.Font:=FontDialog1.Font;

end;

end.