![](/user_photo/2706_HbeT2.jpg)
- •1.Текстовые компоненты Label, Edit, Memo. Кнопка Button
- •Пример 1.1. Задание - Составить программу, вычисляющую корни квадратного уравнения
- •2. Классы и компоненты Delphi,
- •Interface
- •Interface
- •Interface
- •3. Панель переключателей RadioGroup
- •Interface
- •4. Списки: ListBox и ComboBox
- •Interface
- •Interface
- •5. Таблица StringGrid
- •Полный текст модуля Unit1.Pas
- •Interface
- •6. Создание меню. Компоненты MainMenu и PopupMenu
- •Interface
- •Interface
- •7. Диалоговые окна.
- •Interface
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
FontDialog1: TFontDialog;
Memo1 : TMemo;
Button1 : TButton;
Button2 : TButton;
Button3 : TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
with OpenDialog1 do
begin
if not Execute then Exit;
Memo1.Lines.LoadFromFile(FileName)
end
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
with SaveDialog1 do
begin
if not Execute then Exit;
Memo1.Lines.SaveToFile(FileName)
end
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
with FontDialog1 do
begin
if not Execute then Exit;
Memo1.Font := Font
end
end;
End.