473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

The exception not set to an instance of an object Error when I use my control

Got another one. When I put one of my controls on a form I get an error
message: An exception occurred while trying to create an instance of
<mycontrolname>.The exception not set to an instance of an object.

Now my question is: Is there a way to debug what is causing the problem?

I'm guessing the problem occurs while running New. Agree?

Most of what is in New is initializing another of my controls. I could
remove properties from that control one at a time and see when/if the
problem goes away but I hope there's a less painful way then that. Any
ideas?
Cal
Nov 20 '05 #1
1 1532
Cor
Hi Cal,

To debug you can remove the text

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

From the region
#Region "Windows Form Designer generated code"

I hope this helps,

Cor
Got another one. When I put one of my controls on a form I get an error
message: An exception occurred while trying to create an instance of
<mycontrolname>.The exception not set to an instance of an object.

Now my question is: Is there a way to debug what is causing the problem?

I'm guessing the problem occurs while running New. Agree?

Most of what is in New is initializing another of my controls. I could
remove properties from that control one at a time and see when/if the
problem goes away but I hope there's a less painful way then that. Any
ideas?

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: guy | last post by:
i have a method which throws an exception. the thing i dont understand is that the only change between the two versions is a line of code AFTER the one that throws the exception - see code below...
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
2
by: I am Sam | last post by:
I keep getting the following exception error: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request....
3
by: I am Sam | last post by:
I keep getting the following error message when I try to iterate through a CheckBoxList control: Object reference not set to an instance of an object. Description: An unhandled exception...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
1
by: Tim_Mac | last post by:
hi, i am encountering a sporadic exception using crystal reports that is causing me grief, I can't 'handle' it... my code is loading a typed report, and loading a DataSet to it. unfortunately...
1
by: Efi Merdler | last post by:
Hi, I created a user control, but instead of handling exception in the user control level I prefer to handle them in the containing form. In the load event of the containing form I'm using:...
0
by: Tamer Ibrahim | last post by:
Hi, Sometimes, I got the following error message when I use ajax calendar control on some aspx pages : Object reference not set to an instance of an object. Description: An unhandled exception...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.