Toolbox problems

  • Thread starter Thread starter steve bull
  • Start date Start date
S

steve bull

I have encountered the following problems when creating new controls that I have added to the toolbox :

1. When I click on the design panel containing a number of widgets I get a build error of "Object reference not set to
an instace of an object". It does not appear if I do a regular build. How can I identify where this problem is
happening? When I double click on the error it just takes me to the top of the source code for the panel but doesn't
indicate where it is having the problem.


2. Can I debug the toolbox drag and drop creation? I.e. when I drag a new widget onto a form or panel.


3. I have tried to capture resizing of a widget by implementing public override void OnResize so I can repaint the
widget properly. It doesn't seem to get captured when the widget gets resized - at least while resizing on the design
tab for the panel on which it was dropped. If I knew how to debug these then I might be able to figure out why.


Any information on how this process works and can be debugged would be welcome.

Thanks,

Steve
 
Take a look in Windows Forms Tips and Tricks. The article on debugging
controls will help you out. If you've created a designer for your control
you'll be able to put breakpoints in there as well as in the control to see
what's happening when the control is created durnng design time.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
Back
Top