H
Harry Whitehouse
I have a form which, when launched, automatically begins a fairly intensive
process. The problem is that the process is so intensive that the form
doesn't have time to draw itself -- it only becomes visible at the end of
the process.
In C++ I used to solve this type of problem by sending a POSTMESSAGE during
the dialog initialization process. The POSTMESSAGE would trigger a member
which performed the intensive process. But the dialog would always have
plenty of time to render.
What I'm doing in C# is trying to emulate a button press like this, but this
is causing the form to draw at the very end of the process. What I want to
insure is that the form is completely rendered before I begin the process.
public Form1()
{
InitializeComponent();
button2_Click(new Object(),new EventArgs());
}
private void button2_Click(object sender, System.EventArgs e)
{
// CPU Intensive process
}
Any thoughts how I might do this in C#??
TIA
Harry
process. The problem is that the process is so intensive that the form
doesn't have time to draw itself -- it only becomes visible at the end of
the process.
In C++ I used to solve this type of problem by sending a POSTMESSAGE during
the dialog initialization process. The POSTMESSAGE would trigger a member
which performed the intensive process. But the dialog would always have
plenty of time to render.
What I'm doing in C# is trying to emulate a button press like this, but this
is causing the form to draw at the very end of the process. What I want to
insure is that the form is completely rendered before I begin the process.
public Form1()
{
InitializeComponent();
button2_Click(new Object(),new EventArgs());
}
private void button2_Click(object sender, System.EventArgs e)
{
// CPU Intensive process
}
Any thoughts how I might do this in C#??
TIA
Harry