BitMenuF.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:5k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit BitMenuF;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ExtCtrls, Menus;
- type
- TForm1 = class(TForm)
- ShapeDemo: TShape;
- MainMenu1: TMainMenu;
- File1: TMenuItem;
- Exit1: TMenuItem;
- Shape1: TMenuItem;
- Ellipse1: TMenuItem;
- RoundRec1: TMenuItem;
- Rectang1: TMenuItem;
- Color1: TMenuItem;
- Red1: TMenuItem;
- Green1: TMenuItem;
- Blue1: TMenuItem;
- Help1: TMenuItem;
- About1: TMenuItem;
- procedure FormResize(Sender: TObject);
- procedure Exit1Click(Sender: TObject);
- procedure About1Click(Sender: TObject);
- procedure ColorClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure Ellipse1Click(Sender: TObject);
- procedure RoundRec1Click(Sender: TObject);
- procedure Rectang1Click(Sender: TObject);
- procedure ColorMeasureItem(Sender: TObject; ACanvas: TCanvas;
- var Width, Height: Integer);
- procedure ColorDrawItem(Sender: TObject; ACanvas: TCanvas;
- ARect: TRect; Selected: Boolean);
- procedure ShapeMeasureItem(Sender: TObject; ACanvas: TCanvas;
- var Width, Height: Integer);
- procedure Ellipse1DrawItem(Sender: TObject; ACanvas: TCanvas;
- ARect: TRect; Selected: Boolean);
- procedure RoundRec1DrawItem(Sender: TObject; ACanvas: TCanvas;
- ARect: TRect; Selected: Boolean);
- procedure Rectang1DrawItem(Sender: TObject; ACanvas: TCanvas;
- ARect: TRect; Selected: Boolean);
- private
- { Private declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- procedure TForm1.FormResize(Sender: TObject);
- begin
- ShapeDemo.SetBounds (ClientWidth div 6, ClientHeight div 6,
- 2 * ClientWidth div 3, 2 * ClientHeight div 3);
- end;
- procedure TForm1.Exit1Click(Sender: TObject);
- begin
- Close;
- end;
- procedure TForm1.About1Click(Sender: TObject);
- begin
- MessageDlg ('Owner-draw menu example,'#13 +
- 'from "Mastering Delphi" by Marco Cant