J
Jeroen Ceuppens
So, i have an object x (GetImageNode.cs), that object wants to add a panel
to my mainform (Aviewer): Aviewer.MakePanel(1);
but i always get these fault:
C:\Documents and Settings\Eindwerk\Mijn documenten\BARCO\Eindwerk\Project
Files\thuis\21februari\AviewerV1\Nodes\GetImageNode.cs(42): An object
reference is required for the nonstatic field, method, or property
'AviewerV1.Aviewer.MakePanel(int)'
MAIN FUNCTION IN the FORM Aviewer
static void Main()
{
Aviewer aview=new Aviewer();
Application.Run(aview);
}
FUNCTION (in Aviewer) I WANT TO REACH
public void MakePanel(int type) ==> i can't make it static, because then i
can't use this.Controls
{
switch(type)
{
case 1: this.Controls.Add(new PanelGetImage());break;//GetImage
default: break;
}
}
to my mainform (Aviewer): Aviewer.MakePanel(1);
but i always get these fault:
C:\Documents and Settings\Eindwerk\Mijn documenten\BARCO\Eindwerk\Project
Files\thuis\21februari\AviewerV1\Nodes\GetImageNode.cs(42): An object
reference is required for the nonstatic field, method, or property
'AviewerV1.Aviewer.MakePanel(int)'
MAIN FUNCTION IN the FORM Aviewer
static void Main()
{
Aviewer aview=new Aviewer();
Application.Run(aview);
}
FUNCTION (in Aviewer) I WANT TO REACH
public void MakePanel(int type) ==> i can't make it static, because then i
can't use this.Controls
{
switch(type)
{
case 1: this.Controls.Add(new PanelGetImage());break;//GetImage
default: break;
}
}