C
Curious
I have the following code:
if (this.InvokeRequired)
{
IAsyncResult result = this.BeginInvoke(new
EventHandler(this.UpdateButtons),
new object[] { this, EventArgs.Empty });
while ((!result.IsCompleted) &&
(result.AsyncWaitHandle.WaitOne(100, false)))
{
//Waitting for the asynch call to complete.
}
this.EndInvoke(result);
}
else
{
UpdateButtons(this, EventArgs.Empty);
}
Could anyone tell me what "InvokeRequired" is about, and what
"BeginInvoke" does?
Thanks!
if (this.InvokeRequired)
{
IAsyncResult result = this.BeginInvoke(new
EventHandler(this.UpdateButtons),
new object[] { this, EventArgs.Empty });
while ((!result.IsCompleted) &&
(result.AsyncWaitHandle.WaitOne(100, false)))
{
//Waitting for the asynch call to complete.
}
this.EndInvoke(result);
}
else
{
UpdateButtons(this, EventArgs.Empty);
}
Could anyone tell me what "InvokeRequired" is about, and what
"BeginInvoke" does?
Thanks!