반응형

### 01. MDI Child Form Name으로 Form 활성화 ###

Form fm

Type t = Type.GetType("myApp.forms." + _name);
fm = Activator.CreateInstance(t) as Form;
fm.MdiParent = this;
fm.Show();

 

### 02.  다른 Form의 함수를 호출 ###

using System.Reflection;

 

Type t = fm.GetType();
MethodInfo minfo = t.GetMethod("ClearData", BindingFlags.Instance | BindingFlags.Public);
object[] prm = new object[1];
prm[0] = strParam;
minfo.Invoke(fm, prm);

 

※ 02. 참고 : https://amored8701.tistory.com/112

 

 

+ Recent posts