I am trying to decrease a form load time
Main.cs
- private void UTMaster_ToolClick(object sender, ToolClickEventArgs e) //when I click on tag then this will call
- {
- 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"); //ShowOrganisationForm is a form
- ParameterInfo[] Arrayparams = method.GetParameters();
- if (Arrayparams.Length == 0)
- {
- method.Invoke(frms, new object[0]);
- }
- else
- {
- //frms.Load += new (method);
- object[] paramsArray;
- paramsArray = new object[] { e.Tool.propertytag.Tag.ToString() };
- method.Invoke(frms, paramsArray);
- }
- }
- public void ShowOrganisationForm()
- {
- DataSetControl(); //this method take too much time to load
- this.Show();
- }
- private void DataSetControl()
- {
- //multiple combox fill code here
- }
I am working with windows form
I am trying to decrease the form load time but not work please help
R.D IpPosted Mar 22, 2021, 4:13 PM
Rijwan AnsariPosted Mar 22, 2021, 8:26 AM
R.D IpPosted Mar 22, 2021, 7:01 AM
Amit GuptaPosted Mar 22, 2021, 5:56 AM
R.D IpPosted Mar 22, 2021, 4:49 AM
Kiran MohantyPosted Mar 21, 2021, 5:08 AM
Amit GuptaPosted Mar 19, 2021, 9:18 AM
R.D IpPosted Mar 19, 2021, 4:29 AM
Amit GuptaPosted Mar 19, 2021, 4:09 AM