cursor not visible

ehelin

Freshman
Joined
Oct 11, 2005
Messages
48
Hi:

I am using a standard combo box. When the user tabs in, I use the drop down property to let them select from the list...which works fine. But, the mouse cursor disappears until a selection is made from the drop down list.

I have tried variations of cursor.show and the cursor is set to the arrow in the properties window...but it won't show.

Thoughts?

Eric
 
Found the answer...in case someone can use it

'This method sets the cursor above a combo box when the method of entry is something other than
'a mouse click. If not used, the mouse cursor will not show.
'
'PLEASE NOTE: The "fudge" factors in the positioning of the cursor were obtained through
'trial and error...
Private Sub SetUpComboCursor(ByRef pCombobox As ComboBox _
, ByVal pParentComponentId As Integer)
Dim ComboBoxScreenPt As Point
Dim ComboBoxTop As Integer
Dim ComboBoxRight As Integer

Try
'get the current cursor position, move over combo box and then set drop down.
If pParentComponentId = Constants.VITALS_TAB Then
ComboBoxScreenPt = New Point(pCombobox.Location.X - 60, pCombobox.Location.Y - 15)
ComboBoxScreenPt = pCombobox.PointToScreen(ComboBoxScreenPt)
Cursor.Position = ComboBoxScreenPt
pCombobox.Cursor = Cursors.Default
pCombobox.DroppedDown = True

Else
'assume main form
ComboBoxTop = Me.Location.Y + pCombobox.Location.Y + 50
ComboBoxRight = Me.Location.X + pCombobox.Location.X + (pCombobox.Width - 5)
Cursor.Position = New Point(ComboBoxRight, ComboBoxTop)
pCombobox.Cursor = Cursors.Default
pCombobox.DroppedDown = True
End If

Catch ex As Exception
LocalErrorLink.Error_Handler(ex)
End Try

End Sub

Found a version of this on another website.

Eric
 
Back
Top