Slightly modified from the bottom of
http://www.dotnet247.com/247reference/msgs/49/246130.aspx
---snip---
Dim c As Control =
DirectCast(GetControlByClassName("System.Windows.Forms",
"System.Windows.Forms.Button"), Control)
Private Function GetControlByClassName(ByVal AssemblyName As
String, _
ByVal ClassName As String)
As Object
Return
System.Activator.CreateInstance([Assembly].Load(AssemblyName).GetType(ClassName))
End Function
---snip---
Question is: Is there any way I could possibly create a new object
just by supplying the class name (e.g. "System.Windows.Forms.Button")?
Mind you: This has to work with controls in multiple assemblies, but
aren't those already referenced by the project.
?!?
/JB
Joergen Bech <jbech<NOSPAM>@ - 24 Feb 2005 16:01 GMT
Hm ... never mind. I think this is what I'm looking for:
http://www.dotnetspider.com/technology/kbpages/594.aspx
Maybe?
/JB
>Slightly modified from the bottom of
>http://www.dotnet247.com/247reference/msgs/49/246130.aspx
[quoted text clipped - 23 lines]
>
>/JB