Interesting ..i have no idea what an ioc container is?
From: [email protected] [mailto:[email protected]] On Behalf Of David Kean Sent: Thursday, 24 June 2010 10:57 AM To: ozDotNet Subject: RE: Get main form instance from usercontrol This is why I also use an IoC container - I'm also lazy, and I have it worry about finding me the dependencies. ;) From: [email protected] [mailto:[email protected]] On Behalf Of Anthony Sent: Wednesday, June 23, 2010 5:50 PM To: 'ozDotNet' Subject: RE: Get main form instance from usercontrol Agree with you..but was hoping to save some effort setting a property for all instances of my control. I guess i should just add a property and go for it..lazy me! From: [email protected] [mailto:[email protected]] On Behalf Of David Kean Sent: Thursday, 24 June 2010 10:41 AM To: ozDotNet Subject: RE: Get main form instance from usercontrol What are you trying to do? A user control should try and be naive to where it's being hosted - I typically have these communicate to the form hosting it by using events and properties. From: [email protected] [mailto:[email protected]] On Behalf Of Joseph Clark Sent: Wednesday, June 23, 2010 5:31 PM To: ozDotNet Subject: Re: Get main form instance from usercontrol http://msdn.microsoft.com/en-us/library/system.windows.forms.control.findfor m.aspx should work? On Thu, Jun 24, 2010 at 10:25 AM, Anthony <[email protected]> wrote: What method do i need to use to the get the main instance of a form from a usercontrol? The main form is of type FormMain but how do i access the instance from a usercontrol? If i use me.parent..this would only give the instance of the container object. Using vb.net winforms Is your <http://www.intellixperience.com/signup.aspx> website being IntelliXperienced? regards Anthony (*12QWERNB*) Is your website being IntelliXperienced?
