"Object reference not set to an instance of an object".

  • Thread starter Thread starter Maksim Chepel
  • Start date Start date
M

Maksim Chepel

What is that? I have my own OCX which I added to the toolbar for my form in
C# and want to throw it onto the form. When I do that I get this exception.
And there is no code at that point.
That OCX works fine in VB 6.
What's wrong?
Thanks a lot!
 
Dear Chepel

You might not have created an instance of some object

this happens when you dont use the 'new' operator to create an instance of an objec

----- Maksim Chepel wrote: ----

What is that? I have my own OCX which I added to the toolbar for my form i
C# and want to throw it onto the form. When I do that I get this exception
And there is no code at that point
That OCX works fine in VB 6
What's wrong
Thanks a lot
 
But I just drop it on the form as a tool from a toolbox. Why/where/when do I
need to call 'new' for that?? I thought studio have to generate code for me
in that situation, no?


Dear Chepel,

You might not have created an instance of some object.

this happens when you dont use the 'new' operator to create an instance of
an object

----- Maksim Chepel wrote: -----

What is that? I have my own OCX which I added to the toolbar for my
form in
C# and want to throw it onto the form. When I do that I get this
exception.
And there is no code at that point.
That OCX works fine in VB 6.
What's wrong?
Thanks a lot!
 
Back
Top