Hola Neftali, movorack y escafandra. Gracias por sus respuestas. Tienen razón, entonces aquí les muestro todo el código y también les adjunto los archivos, si lo ejecutan verán el error. Una vez más gracias por su tiempo.
main (MDIForm)
Código Delphi
[-]
unit main;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
Tfrm_main = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
frm_main: Tfrm_main;
implementation
{$R *.dfm}
uses
pos;
procedure Tfrm_main.Button1Click(Sender: TObject);
var
pos: Tfrm_pos;
begin
pos := Tfrm_pos.Create(self);
end;
end.
pos (MDIchild)
Código Delphi
[-]
unit pos;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
Tfrm_pos = class(TForm)
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
frm_pos: Tfrm_pos;
implementation
{$R *.dfm}
uses
search;
procedure Tfrm_pos.Button1Click(Sender: TObject);
var
search: Tfrm_search;
begin
search := Tfrm_search.Create(self);
end;
end.
search (MDIchild)
Código Delphi
[-]
unit search;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
Tfrm_search = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
frm_search: Tfrm_search;
implementation
{$R *.dfm}
uses
pos;
procedure Tfrm_search.Button1Click(Sender: TObject);
begin
frm_pos.Label1.Caption := edit1.Text;
end;
end.