J
Jeff Yang
How can I get the instance of a winform class?
namespace DZ
{
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
.......
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
public class A
{
public void GetInstance()
{
//How can I get the instance of Form1?
}
}
}
regards,
Jeff Yang
namespace DZ
{
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
.......
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
public class A
{
public void GetInstance()
{
//How can I get the instance of Form1?
}
}
}
regards,
Jeff Yang