16,550
社区成员
发帖
与我相关
我的任务
分享
public C1DemoForm Run(string typeName, string title, string description)
{
Control.ControlCollection items = panelDemo.Controls;
Type t = Type.GetType(typeName);
loadedCode = false;
try
{
demoForm = t.Assembly.CreateInstance(t.FullName) as C1DemoForm;
c1DockingTabPage_Demo.Text = title;
demoForm.DisplayIn(items);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
return demoForm;
}
Public Function Run(typeName As String, title As String, description As String) As Frm_blank
Dim items As Control.ControlCollection = panelDemo.Controls
Dim t As Type = Type.[GetType](typeName)
loadedCode = False
Try
demoForm = TryCast(t.Assembly.CreateInstance(t.FullName),Frm_blank)
demoForm.DisplayIn(items)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Return demoForm
End Function