Results 1 to 2 of 2

Thread: Help with late binding a user control

  1. #1

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Help with late binding a user control

    I have a usercontrol with a webbrowser control on it compiled out to it's own assembly. This control worked in my project prior to breaking it out to its own assembly.

    Now the goal of doing this is to late bind to the assembly, instantiate the control, and add it to my tab control on my form.

    Code:
    Dim objAssembly As Reflection.Assembly
    objAssembly = Reflection.Assembly.LoadFrom(My.Application.Info.DirectoryPath + "\ppbb.dll")
    Me._SelectionDetail1 = objAssembly.CreateInstance("ppbb.SelectionDetail")
    When I step through this code it seems to create the object however when I try to set some html to the webbrowser control on the usercontrol it nullrefs.

    Do I need to call an initializer on the usercontrol? Can I late bind a user control at all?

    Thanks for any help, Tim
    _____________
    Tim

    If anyone's answer has helped you, please show your appreciation by rating that answer.
    When you get a solution to your issue remember to mark the thread Resolved.


    reference links

  2. #2
    Frenzied Member
    Join Date
    May 2014
    Location
    Central Europe
    Posts
    1,388

    Re: Help with late binding a user control

    had you added the instantiated control to your form by code? i cant remember under which situation i came accross this but i had experienced a control throwing errors when created programatically and working with it without having it added to a forms controls...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width