Results 1 to 3 of 3

Thread: Load FORM dymanic from DLL (Solved)

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2003
    Location
    Amsterdam, Holland
    Posts
    36

    Exclamation Load FORM dymanic from DLL (Solved)

    Hi All,

    With the following code I load a form dynamic form a DLL.
    The procedure works fine, but the problem is that I can only load forms
    without input parameters.
    I tryed a few things, but I don't know how the resolve this,
    (Is there a solution for ????)

    Can somebody help me.

    Thanks in advanced,

    AXH


    VB Code:
    1. Dim Type As String = "<dllname>.<formname>"
    2. Dim asmAssemblyContainingForm As [Assembly] = [Assembly].LoadFrom(<dllname>.dll)
    3. Dim typetoload As Type = asmAssemblyContainingForm.GetType(Type)
    4. Dim GenericInstance As Object
    5. GenericInstance = Activator.CreateInstance(typetoload)
    6. Dim frm As Form = CType(GenericInstance, Form)
    7. frm.ShowDialog()
    8. frm.Dispose()
    9. GC.Collect()
    Last edited by ahollaar; Apr 2nd, 2005 at 04:04 AM. Reason: Problem solved

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