D
Douglas Peterson
Was able to reproduce this with a simple example (using .NET 1.1):
1) Create a new WindowsApplication project
2) Add a button to the form and set its Visible property to false
3) Double click on the form to add Form1_Load handler
3) Add the following code to Form1:
private delegate void DoAsync();
private void Form1_Load(object sender, System.EventArgs e)
{
new DoAsync(DoIt).BeginInvoke(null, null);
}
private void DoIt()
{
this.button1.Visible = true;
}
The main thread will lock up for about 5 minutes or more.
Can someone explain what's happening here to me?
I'm using this method to set all sorts of properties on all sorts of
controls, it's just the Visible property that's causing me grief.
How do I solve this?
In Win32 I might post a user message, can you do that in .NET?
1) Create a new WindowsApplication project
2) Add a button to the form and set its Visible property to false
3) Double click on the form to add Form1_Load handler
3) Add the following code to Form1:
private delegate void DoAsync();
private void Form1_Load(object sender, System.EventArgs e)
{
new DoAsync(DoIt).BeginInvoke(null, null);
}
private void DoIt()
{
this.button1.Visible = true;
}
The main thread will lock up for about 5 minutes or more.
Can someone explain what's happening here to me?
I'm using this method to set all sorts of properties on all sorts of
controls, it's just the Visible property that's causing me grief.
How do I solve this?
In Win32 I might post a user message, can you do that in .NET?