我已经像这样创建了一个新单元,它应该是一个自定义的 TShape。
unit MachineShape;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, extctrls,myDataModule,Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TMachine = class(TShape)
count : Integer;
private
{ Private declarations }
public
{ Public declarations }
procedure PlaceShape(sizeW,sizeH :integer; name, order,asset : string);
end;
implementation
Procedure PlaceShape(sizeW,sizeH :integer; name, order,asset : string);
begin
end;
end.
接下来我将其传递给程序
MachineShape.TMachine.PlaceShape(44,49,'CM402','first','123/33/123');
如何在程序中将形状大小设置为 44 宽和 49 高?
我试过做 TMachine.Width 但它不起作用?谢谢格伦