|
SharpGrid will override all settings to MousePointer properties at Form level and at Screen level. In order to overcome this problem, the SharpGrid object must be disabled. This is due to the fact that SharpGrid has a MousePointer property on each style. You can have a different MousePointer setting on cells, rows, columns, built-in styles, etc. Below is a solution that will prevent your grids from modifying form level MousePointer settings. You will want to call this method before and after setting your mouse pointer settings. Public Sub EnableAppGrids(ByVal blnShowEnabled As Boolean) '******************************** ' place this code in modMain *** ' or somewhere for all to see ** '******************************** Dim f As VB.Form Dim c As VB.Control ' loop through each form For Each f In Forms ' loop through each control in this form For Each c In f.Controls ' if the control is a #Grid object, disable it... If TypeName(c) = "SGGrid" Then Debug.Print f.Name & "." & c.Name & ".Enabled = " & blnShowEnabled c.Enabled = blnShowEnabled End If Next c Next f ' clean up Set f = Nothing Set c = Nothing End Sub You should call this method: Private Sub Command1_Click() Me.MousePointer = vbHourGlass Call EnableAppGrids(False) ' process code here... Me.MousePointer = vbDefault Call EnableAppGrids(True) End Sub
|