Re: [DOTNET] Components, Designer and Dispose

2002-04-18 Thread Mark Boulter
] 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

Re: [DOTNET] Components, Designer and Dispose

2002-04-15 Thread Ian Griffiths
"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

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Axel Heitland
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

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Ian Griffiths
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

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Axel Heitland
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()) {

Re: [DOTNET] Components, Designer and Dispose

2002-04-13 Thread Ramiro
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() { ...