]
Subject: Re: [DOTNET] Components, Designer and Dispose
If the component is being dragged on to the form from the toolbox, all
you
need to do is supply a constructor that takes an IContainer. If you
then
make that constructor call IContainer.Add, passing itself as the
parameter,
this will result in
"Axel Heitland" <[EMAIL PROTECTED]> wrote:
> (1) I'm dragging it onto the form - otherwise it's
> ok to do some manual work (how else?).
How else? Well they might just create the object by writing some code in
the constructor.
>I do see that the form's dispose method get's called when I
> clo
nexpected so I can can tell my
users...
Thanks for the fish ;-)
Axel
-Original Message-
From: Ian Griffiths [mailto:[EMAIL PROTECTED]]
Sent: Sonntag, 14. April 2002 01:04
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Components, Designer and Dispose
If the component is being dragged on
If the component is being dragged on to the form from the toolbox, all you
need to do is supply a constructor that takes an IContainer. If you then
make that constructor call IContainer.Add, passing itself as the parameter,
this will result in your component being added to the 'components' member
OTECTED]
Subject: Re: [DOTNET] Components, Designer and Dispose
Axel,
I'm not really sure about is what you need, but you can enforce the
Dispose() call with the using keyword (C#)
void SomeMethod()
{
...
using (SomeDisposableObject so = new SomeDisposableObject())
{
Axel,
I'm not really sure about is what you need, but you can enforce the
Dispose() call with the using keyword (C#)
void SomeMethod()
{
...
using (SomeDisposableObject so = new SomeDisposableObject())
{
}
...
}
which is identical to
void SomeMethod()
{
...