0
0 x deadbeef
I have constructed the following form:
public class Form1 : System.Windows.Forms.Form
{
//code here to declare components
....
public void GenerateNodes()
{
FillDirectoryTree(tvwSource, true);
FillDirectoryTree(tvwTarget, false);
}
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
//end of class Form1
.....more code
[STAThread]
static void Main()
{
System.Windows.Forms.Form theForm = new Form1();
theForm.GenerateNodes();
}
I want to call the public methods that I have associated with Form1.
However whenever I try to implement them through an instance of Form1 I
get a build error saying that "System.Windows.Forms.Form" does not
contain a definition for GenerateControls(). Why? Are you not allowed to
access methods of classes that are derived from Form? =\
public class Form1 : System.Windows.Forms.Form
{
//code here to declare components
....
public void GenerateNodes()
{
FillDirectoryTree(tvwSource, true);
FillDirectoryTree(tvwTarget, false);
}
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
//end of class Form1
.....more code
[STAThread]
static void Main()
{
System.Windows.Forms.Form theForm = new Form1();
theForm.GenerateNodes();
}
I want to call the public methods that I have associated with Form1.
However whenever I try to implement them through an instance of Form1 I
get a build error saying that "System.Windows.Forms.Form" does not
contain a definition for GenerateControls(). Why? Are you not allowed to
access methods of classes that are derived from Form? =\