G
Guest
want to be able to pass a formname as a string and have the form displayed.
I have read about using the Type and Assembly or Activator .CreateInstance
and have tried several things but none of it works. Here is my situation. I
have a dll called BaseClasses and it has a class called BaseForm. I then
have another dll called Test and a 3rd dll called Insured. When a button is
pressed I want to have a method in the Test.dll call a method in the BaseForm
that accepts the formname and then the BaseForm will display the form passed
in, such as Insured.InsuredSearch (in Insured.dll). I try to get the
assembly, but it never sees the Insured.InsuredSearch. The Insured.dll and
Test.dll have reference to BaseClasses but BaseClasses doesn't reference the
other dlls. Here is some code:
BaseClasses.Navigate(String formName)
{
Assembly aCurAssembly = Assembly.GetExecutingAssembly();
CybeReBaseForm oform = aCurAssembly.CreateInstance(sFormName,true);
}
Test.cmd_click()
{
base.Navigate("Insured.InsuredSearch");
}
Let me know if this doesn't make sense or if more info is needed.
I have read about using the Type and Assembly or Activator .CreateInstance
and have tried several things but none of it works. Here is my situation. I
have a dll called BaseClasses and it has a class called BaseForm. I then
have another dll called Test and a 3rd dll called Insured. When a button is
pressed I want to have a method in the Test.dll call a method in the BaseForm
that accepts the formname and then the BaseForm will display the form passed
in, such as Insured.InsuredSearch (in Insured.dll). I try to get the
assembly, but it never sees the Insured.InsuredSearch. The Insured.dll and
Test.dll have reference to BaseClasses but BaseClasses doesn't reference the
other dlls. Here is some code:
BaseClasses.Navigate(String formName)
{
Assembly aCurAssembly = Assembly.GetExecutingAssembly();
CybeReBaseForm oform = aCurAssembly.CreateInstance(sFormName,true);
}
Test.cmd_click()
{
base.Navigate("Insured.InsuredSearch");
}
Let me know if this doesn't make sense or if more info is needed.