Load Assembly /CreateInstance 
Author Message
 Load Assembly /CreateInstance

Hello,

 I have an assembly SampleDll .This assembly has a class that has a filename
as one of it's members/properties.
 I get the property grid to add a browse button so the user can change the
filename with the propertygrid.
 Here is my code .
                       Imports System.Drawing.Design
                       Imports System.Windows.Forms.Design
                               Imports System.ComponentModel

<Editor(GetType(TextFileNameDialogEditor),GetType(UITypeEditor))> _
                        Public Class SampleProperties
                            Private mFilename as String

                            Public Property Filename as String
                                Get
                                    Return mFilename
                                End Get
                                Set (ByVal  Value as String)
                                    mFilename=Value
                                End Set
                            End Property
                        End class

                        Public Class TextFileNameDialogEditor
                           Inherits FileNameEditor
                           Protected Overrides Sub InitializeDialog(ByVal
openFileDialog As System.Windows.Forms.OpenFileDialog)
                               With openFileDialog
                                    .DefaultExt = "txt"
                                    .Filter = "txt Dateien(*.txt)|*.txt"
                               End With
                        End Sub
                    End Class

Now I try to load this assembly in another assembly with the method "Load"
or "LoadFrom".
I then create an Instance of the class SampleDll with "CreateInstance"
I try to use the new object in my Propertygrid but the browse button does
not appear. WHY???

Any help would be greatly appreciated.

Paul



Sat, 01 Oct 2005 16:31:56 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Serialize problem when using function from seperate assembly dll with createinstance()

2. Serialize problem when using function from seperate assembly dll with createinstance()

3. Error in loading DLL 48 when using CreateInstance

4. Load Assembly

5. One or more of the types in the assembly unable to load

6. How do I load and run assemblies dynamically

7. Dynamically loading an assembly?

8. Loading control from assembly

9. Trying to Dunamically Load Assembly via Reflection

10. Loading an assembly at runtime

11. Types in the assembly failed to load

12. Can not load file or assembly

 

 
Powered by phpBB® Forum Software