By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,557 Members | 1,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,557 IT Pros & Developers. It's quick & easy.

User Control Error

P: n/a
I have create a custom user control and added the project
into another project. It created a tab 'My User Controls'
and added a reference. When i drag the control on a form
i get the following error :

An exception occurred while trying to an instance of
ArtigosArmazem.UserControl1. The exception was "Object
reference not set to an instance of an object.".

Any suggestion on what i am doing wrong would be most
welcome, thank you.

Kind Regards
Jorge Cavalheiro

Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
When using a control some of your code may run even though
your in design mode (the control is already in semi-run

You probably have some things in your control constructor.

Try put something like
If not Me.DesignMode in your control constructor and
figure it out from there.

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.