I am trying to decrease a form load time
Main.cs
- private void UTMaster_ToolClick(object sender, ToolClickEventArgs e)
- {
- OrganisationMethod(sender,e);
- }
- private void OrganisationMethod(object sender, ToolClickEventArgs e)
- {
- Form frms = (Form)Activator.CreateInstance(Type.GetType(strtagname));
- Type ObjType = frms.GetType();
- MethodInfo method = ObjType.GetMethod("ShowOrganisationForm");
-
-
- ParameterInfo[] Arrayparams = method.GetParameters();
-
- if (Arrayparams.Length == 0)
- {
- method.Invoke(frms, new object[0]);
- }
- else
- {
-
- object[] paramsArray;
-
- paramsArray = new object[] { e.Tool.propertytag.Tag.ToString() };
-
- method.Invoke(frms, paramsArray);
-
- }
- }
organiseform.cs
- public void ShowOrganisationForm()
- {
- DataSetControl(); //this method take too much time to load
- this.Show();
- }
- private void DataSetControl()
- {
-
- }
I am working with windows form
I am trying to decrease the form load time but not work please help