G
Guest
I have some code below that is trying to instantiate a form via a string containing the class name of the form
The assembly by 'partial name' seems to be ok, it returns an object
The GetType(string) is returning Nothing.
I can type in the string as is in the Command Window or Code Window and intellisense is showing the properties and methods ("PECS.SelectPOTypeForm")
I've also tried the same with
System.Reflection.Assembly.GetExecutingAssembly.GetTyp
since 'PECS' is the name of the executing assembly
Does this have anything to do with my form being a 'RunTimeType'
thanks
tro
=============== My Code...========
Private Function CreateClassByName(ByVal PartialAssemblyName As String, ByVal FormName As String) As Objec
Dim QualifiedClassName As String = "PECS." & FormNam
Return Activator.CreateInstance(
System.Reflection.Assembly.LoadWithPartialName("PECS").GetType(QualifiedClassName)
End Functio
==============================
=============== From Debug Window =
?gettype(PECS.SelectPOTypesForm).Typehandl
{System.RuntimeTypeHandle
Value: 14763622
?System.Reflection.Assembly.LoadWithPartialName("PECS").GetType(QualifiedClassName
Nothin
==============================
The assembly by 'partial name' seems to be ok, it returns an object
The GetType(string) is returning Nothing.
I can type in the string as is in the Command Window or Code Window and intellisense is showing the properties and methods ("PECS.SelectPOTypeForm")
I've also tried the same with
System.Reflection.Assembly.GetExecutingAssembly.GetTyp
since 'PECS' is the name of the executing assembly
Does this have anything to do with my form being a 'RunTimeType'
thanks
tro
=============== My Code...========
Private Function CreateClassByName(ByVal PartialAssemblyName As String, ByVal FormName As String) As Objec
Dim QualifiedClassName As String = "PECS." & FormNam
Return Activator.CreateInstance(
System.Reflection.Assembly.LoadWithPartialName("PECS").GetType(QualifiedClassName)
End Functio
==============================
=============== From Debug Window =
?gettype(PECS.SelectPOTypesForm).Typehandl
{System.RuntimeTypeHandle
Value: 14763622
?System.Reflection.Assembly.LoadWithPartialName("PECS").GetType(QualifiedClassName
Nothin
==============================