TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
R.D Ip
NA
76
8.5k
how to decrease time of long running method in c#(windows form)
Mar 19 2021 1:57 AM
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);
}
}
organiseform.cs
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
Reply
Answers (
9
)
asp.net core date from json is displayed incorrectly in jquery
asp.net core ef count rows containing a specific data