Necesito que el Form1 al arrancar me muestre en un rectangulo y la funcion que lo hace esta en la Unit2
Algo asi,
Código Delphi
[-]unit Forma1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
Forma1 = class(TForm)
Image1: TImage;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
private
public
end;
var
Forma1: TForma1;
implementation
uses
Unit2;
{$R *.dfm}
procedure TForma1.FormCreate(Sender: TObject);
begin
Rueda;
end;
end.
////---------------------------------------------
Código Delphi
[-]Unit Forma2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics,
Controls, Forms, Dialogs, ExtCtrls, Math, StdCtrls, Buttons;
procedure rueda;
implementation
procedure rueda;
begin
with TForma1.Image1.Canvas do
begin
Pen.Color := clNavy;
Pen.Width := 5;
Brush.Color := clYellow;
Brush.Style := bsDiagCross;
Ellipse( 160, 10, 260, 110 );
end;
end;
end.
Solo cambie el showmessage pero no genera la rueda,,,sigue el mismo error de Undefined identifier