V
Vladimir.Sakharuk
I have MDI child form. It has detailed ListView control docked fill. On
Load event it set the cursor to wait. I have use 3 first lines together
or separate.
private void Form2_Load(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
listView1.Cursor = Cursors.WaitCursor;
Cursor.Current = Cursors.WaitCursor;
RunAsyncCallDelegate msc = new RunAsyncCallDelegate(RunAsyncCall);
AsyncCallback cb = new AsyncCallback(RunAsyncCallback);
_asyncResult = msc.BeginInvoke(cb, null);
executionTimer.Enabled=true;
}
Than after a delegate returns I set the cursor back in a timer event.
private void executionTimer_Tick(object sender, System.EventArgs e)
{
if(_asyncResult.IsCompleted)
{
this.Cursor = Cursors.Default;
listView1.Cursor = Cursors.Default;
Cursor.Current = Cursors.Default;
}
}
The problem is follows:
During processing when Cursor is over listview it is Default cursor,
and not the WaitCursor.
When I change docked from fill the cursor over the form where no
listview is WaitCursor, but over listview is still Default.
If I remove delegate it does shows WaitCursor cursor but application is
frozen while it works(of cause) so it unacceptable.
Thank you
\/|ad.
Load event it set the cursor to wait. I have use 3 first lines together
or separate.
private void Form2_Load(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
listView1.Cursor = Cursors.WaitCursor;
Cursor.Current = Cursors.WaitCursor;
RunAsyncCallDelegate msc = new RunAsyncCallDelegate(RunAsyncCall);
AsyncCallback cb = new AsyncCallback(RunAsyncCallback);
_asyncResult = msc.BeginInvoke(cb, null);
executionTimer.Enabled=true;
}
Than after a delegate returns I set the cursor back in a timer event.
private void executionTimer_Tick(object sender, System.EventArgs e)
{
if(_asyncResult.IsCompleted)
{
this.Cursor = Cursors.Default;
listView1.Cursor = Cursors.Default;
Cursor.Current = Cursors.Default;
}
}
The problem is follows:
During processing when Cursor is over listview it is Default cursor,
and not the WaitCursor.
When I change docked from fill the cursor over the form where no
listview is WaitCursor, but over listview is still Default.
If I remove delegate it does shows WaitCursor cursor but application is
frozen while it works(of cause) so it unacceptable.
Thank you
\/|ad.