我想通过输入的坐标来划线,或点,不知道有没有相关的控件,我有其它软件里看到过相关的功能,但是就是不知道什么控件可以实现,哪位兄弟知道,告诉一声。相关图片在:http://www.xlhb.com/images/gps.jpg
解决方案 »
- 现在delphi工作好找吗-北京
- 求助:'Query2:Parameter 'bh' not found'
- delphi7+access2003打包问题
- 急急急!!!网络数据通讯问题(多线程如何解决???)
- 在Delphi2006即将发布之际,大家来灌灌水,我先来谈点对未来Delphi发展的希望(散分)
- 如何删除应用程序路径中产生的垃圾文件。比如我的系统每次启动后会产生一些*.mb文件,我想在关闭系统时将他删除!怎么操作!给段代码!谢
- 在quickreport中怎样给纸张设置赋值
- 那里有Delphi5的补丁包?
- 由于添加一个窗体而引起DataModule出现异常,还有救吗?
- 如何防止程序二次执行and如何使程序连续执行
- 关于DataGrid一个小问题!
- 使用了了dxDBEdit,使用回车跳到另外一个dxDBEdit后,cds.FieldByName('ID').asstring里竟然为空???
TLineGriphic = class(TGraphicControl)
private
FPixelsRightX: Integer;
FPixelsLeftY: Integer;
FPixelsLeftX: Integer;
FPixelsRightY: Integer;
procedure SetPixelsLeftX(const Value: Integer);
procedure SetPixelsLeftY(const Value: Integer);
procedure SetPixelsRightX(const Value: Integer);
procedure SetPixelsRightY(const Value: Integer);
protected
procedure Paint; override;
public
published
property PixelsLeftX: Integer read FPixelsLeftX write SetPixelsLeftX;
property PixelsLeftY: Integer read FPixelsLeftY write SetPixelsLeftY;
property PixelsRightX: Integer read FPixelsRightX write SetPixelsRightX;
property PixelsRightY: Integer read FPixelsRightY write SetPixelsRightY;
end;implementation{ TLineGriphic }procedure TLineGriphic.Paint;
begin
inherited;
Self.Canvas.Pen.Color := clred;
Self.Canvas.MoveTo(0, 0);
Self.Canvas.LineTo(Width, Height);
end;procedure TLineGriphic.SetPixelsLeftX(const Value: Integer);
begin
Self.FPixelsLeftX := Value;
Self.Left := Value;
end;procedure TLineGriphic.SetPixelsLeftY(const Value: Integer);
begin
Self.FPixelsLeftY := Value;
Self.Top := Value;
end;procedure TLineGriphic.SetPixelsRightX(const Value: Integer);
begin
Self.FPixelsRightX := Value;
Self.Width := Self.FPixelsRightX - Self.FPixelsLeftX + 1;
end;procedure TLineGriphic.SetPixelsRightY(const Value: Integer);
begin
Self.FPixelsRightY := Value;
Self.Height := Self.FPixelsRightY - Self.FPixelsLeftY + 1;
end;
自己看看. 再完善它吧..
Canvas.LineTO
这个就可以了