missing method exception in user control

K

kenneth av

i'm attempting to build my own tree control that derives
from usercontrol. but when i create an object of my derived
type and attempt to initialize it, i get a missing method
exception. there's nothing fancy about it....

public class TsTreeControlNode : System.Windows.Forms.Control
{
private System.Windows.Forms.PictureBox expandIcon;
private System.Windows.Forms.PictureBox iconBox;
private System.Windows.Forms.Label textLabel;
private System.Windows.Forms.PictureBox icon;
private System.Windows.Forms.Label name;

public TsTreeControlNode( string text )
{
InitializeComponent();
}

private void InitializeComponent()
{
// Component Designer generated code
}
}

the constructor gets called fine, but when it goes to
execute InitializeComponent, i get the exception. weird
thing is that when i change the content of that method to
something benign, it does manage to find the method! any
thoughts on what might be causing this behavior?

thanks,
ken
 
L

Lloyd Dupont

I don't know in your particular case but I had a similar problem.
I had a stack overflow in a delegate (calling a function calling a function,
calling the delegate) but I had this missing method exception.

finally I use the debugger, run the code line by line and figure out what
was wrong ...

try the debugger !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top