Чтение онлайн

ЖАНРЫ

Советы по Delphi. Версия 1.4.3 от 1.1.2001

Озеров Валентин

Шрифт:

{ Выводим бары и текст для оси X }

For i := Low(DataSample) to High(DataSample) do begin

with ARect do begin

Right := Left + Wd;

Bottom:= Top - Round((Top-5) * (DataSample[I] / Norm));

end; { with }

{ Заполняем бар }

Brush.color:= clFuchsia;

FillRect(ARect);

{
Выводим текст для горизонтальной оси }

Brush.color:= clWhite;

TextOut(ARect.Left, ClipRect.Bottom div 2 - Font.Height, StrPas(DataItemNames[i]));

with ARect do Left := Left + Wd + Step;

end; { for }

 end; { with }

end;

end.{ *** КОНЕЦ КОДА DDEMLCLU.PAS *** }

{ *** НАЧАЛО КОДА DDEMLSVR.DPR *** }

program Ddemlsvr;

uses Forms,Ddesvru in 'DDESVRU.PAS' {Form1}, Ddedlg in '\DELPHI\BIN\DDEDLG.PAS' {DataEntry};

{$R *.RES}

begin

 Application.CreateForm(TForm1, Form1);

 Application.CreateForm(TDataEntry, DataEntry);

 Application.Run;

end.

{ *** КОНЕЦ КОДА DDEMLSVR.DPR *** }

{ *** НАЧАЛО КОДА DDESVRU.DFM *** }

object Form1: TForm1

 Left = 712

 Top = 98

 Width = 307

 Height = 162

 Caption = 'Демонстрация DDEML, Серверное приложение'

 Color = clWhite

 Font.Color = clWindow

 TextFont.Height = -13

 Font.Name = 'System'

 Font.Style = []

 Menu = MainMenu1

 PixelsPerInch = 96

 OnCreate = FormCreate

 OnDestroy = FormDestroy

 OnShow = FormShow

 TextHeight = 16

 object Label1: TLabel

Left = 0

Top = 0

Width = 99

Height = 16

Caption = 'Текущие значения:'

 end

 object Label2: TLabel

Left = 16

Top = 24

Width = 74

Height = 16

Caption = 'Data Item1:'

 end

 object Label3: TLabel

Left = 16

Top = 40

Width = 74

Height = 16

Caption = 'Data Item2:'

 end

 object Label4: TLabel

Left = 16

Top = 56

Width = 74

Height = 16

Caption = 'Data Item3:'

 end

 object Label5: TLabel

Left = 0

Top = 88

Width = 265

Height = 16

Caption = 'Выбор
данных | Ввод данных для изменения значений.'

 end

 object Label6: TLabel

Left = 96

Top = 24

Width = 8

Height = 16

Caption = '0'

 end

 object Label7: TLabel

Left = 96

Top = 40

Width = 8

Height = 16

Caption = '0'

 end

 object Label8: TLabel

Left = 96

Top = 56

Width = 8

Height = 16

Caption = '0'

 end

 object MainMenu1: TMain

MenuLeft = 352

Top = 24

object File1: TMenuItem

Caption = '&Файл'

object Exit1: TMenuItem

Caption = '&Выход'

OnClick = Exit1Click

end

end

object Data1: TMenuItem

Caption = '&Данные'

object EnterData1: TMenuItem

Caption = '&Ввод данных'

OnClick = EnterData1Click

end

object Clear1: TMenuItem

Caption = '&Очистить'

Поделиться с друзьями: