Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
Dim i As Integer
Do Until i = Me.Controls.Count
Me.Controls(i).Cursor = System.Windows.Forms.Cursors.WaitCursor
i = i + 1
Loop
Intensive? Even at 1000 controls, I don't think it is very intesive to change the properties of them. Probably much less intensive than loading up the form initially with all the controls.
I was using a datagrid and wanted the hand cursor to show up whenever I moved it up and down the rows displayed in my datagrid. I used the mousemove event of the datagrid to change my cursor like this...
"me.datagrid1.cursor = cursors.hand"
This would work only when I first entered the grid but as soon as I moved it up or down a row it would go back to the default cursor. I resolved this by putting both..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.