در کد زیر نحوه انجام کار رو نشان داده ام که می توانید از آن استفاده کنید:
namespace WindowsApplication1;
interface
uses
System.Drawing,
System.Collections,
System.Collections.Generic,
System.Linq,
System.Windows.Forms,
System.ComponentModel;
type
MainForm = partial class(System.Windows.Forms.Form)
private
method button1_Click(sender: System.Object; e: System.EventArgs);
protected
method Dispose(disposing: Boolean); override;
public
constructor;
// Look at This
frm : Form2;
///////////////
end;
implementation
constructor MainForm;
begin
InitializeComponent();
end;
method MainForm.Dispose(disposing: Boolean);
begin
if disposing then begin
if assigned(components) then
components.Dispose();
end;
inherited Dispose(disposing);
end;
method MainForm.button1_Click(sender: System.Object; e: System.EventArgs);
begin
// Look at This
frm:= new Form2();
frm.Show(); // or frm.ShowDialog();
/////////////////
end;
end.