unit demoform;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons;type
TForm1 = class(TForm)
Shape1: TShape;
ColorDialog1: TColorDialog;
Button1: TButton;
Button2: TButton;
Button3: TButton;
BitBtn1: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
Shape1.Shape:= stRectangle;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Shape1.Shape:= stRoundRect;
end;procedure TForm1.Button3Click(Sender: TObject);
begin
Shape1.Shape:= stEllipse;
end;procedure TForm1.BitBtn1Click(Sender: TObject);
begin
ColorDialog1.Execute; Shape1.Brush.Color:= ColorDialog1.Color;
end;end.菜鸟问题,请帮忙指点.谢谢!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons;type
TForm1 = class(TForm)
Shape1: TShape;
ColorDialog1: TColorDialog;
Button1: TButton;
Button2: TButton;
Button3: TButton;
BitBtn1: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
Shape1.Shape:= stRectangle;
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Shape1.Shape:= stRoundRect;
end;procedure TForm1.Button3Click(Sender: TObject);
begin
Shape1.Shape:= stEllipse;
end;procedure TForm1.BitBtn1Click(Sender: TObject);
begin
ColorDialog1.Execute; Shape1.Brush.Color:= ColorDialog1.Color;
end;end.菜鸟问题,请帮忙指点.谢谢!
解决方案 »
- 求一个让程序以服务方式启动的引用单元?
- delphi的dcr文件又是干什么?delphi怎么这么多文件啊?
- 存储过程无法正常运行
- VB中的集合类型Collection 对应delphi中是什么数据类型。
- StringGrid的若干行,个、当它是一个表里的若干条记录,怎么同时写入一个表里?
- 怎样使注册表生效?
- 怎样将shape控件始终显示出来,也就是不被其他组件遮盖住??
- delphi中有没有象C&C++中的static变量,我想在一个函数中申明一个这样的变量,要不我只好定义全局变量了:(
- 2个Dataset如何合并?3个呢?
- 亮剑 [/color]
- Delphi的随机数如何产生
- 一个关于程序结构的问题!急!
运行到这的时候提示错误
[Error] demoform.pas(41): Illegal character in input file: ' ' ($A1A1)
[Error] demoform.pas(51): Illegal character in input file: ' ' ($A1A1)
[Error] demoform.pas(53): Illegal character in input file: ' ' ($A1A1)
[Fatal Error] sample.dpr(5): Could not compile used unit 'demoform.pas'