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

4 visualizzazioni
Passa al primo messaggio da leggere

active

da leggere,
28 dic 2003, 20:59:0128/12/03
a
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


Cor

da leggere,
29 dic 2003, 04:23:1729/12/03
a
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

active

da leggere,
29 dic 2003, 15:07:1929/12/03
a

"Cor" <n...@non.com> wrote in message
news:%23U6Tb2e...@tk2msftngp13.phx.gbl...

> 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

I've fixed the problem but that is good to know.
I'll be more sensitive to those attributes in the future.

Thanks
Cal

Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi