I've even now overriden the paint method in my custom control and the paint
method in the extended listView class that is within my custom control.
Within that paint method, I try and override every cursor I can find.
The result of this, is the cursor is a default cursor when over the extended
listView object within the control, but it is an hour glass when it is
anywhere else on the control or form.
protected override void OnPaint(PaintEventArgs pea) {
if (this.ThreadRunning) {
//I'm trying to adjust all of the cursors just for testing.
this.Parent.Cursor=Cursors.WaitCursor;
this.Cursor=Cursors.WaitCursor;
Cursor=Cursors.WaitCursor;
}
}
One other note, I am kicking off a worker thread within my extend listView
object that is on my custom control. Any thoughts?
"Craig" wrote:
I'm trying to do this within a control I've created:
Cursor.Current = Cursors.WaitCursor;
During the initialization of the parent form, my control gets added to the
form, and while the control is being intialized, I call a method within the
control that sets the cursor to Cursors.WaitCursor, then processing
continues. I want the Cursor to remain that way until I set it back at any
given time, and if I don't set it back, I want to remain a WaitCursor.
I can't get this to work, I'm guessing it might have to do with the loading
of the form, resetting the cursor or something? How can I do this?