Mouse Location
-
OK, I am in the home stretch here, dynamic context menu over dynamic control arrays, for a guy new to .net. I have it all working except for one small, strange little thing. In my procedure to show the context menu, I thought I could just use the me.mouseposition. as follows:
Private Sub lblSlot_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
HandlePopup(sender, e) ' build my menu
Debug.Write(Me.MousePosition())
ContextMenu1.Show(Me, Me.MousePosition)
Debug.Write(Me.MousePosition())
End Subif I look at the output in the debug window pre and post clicking the mouse and seeing the popup, I will see something like the following: The menu does not pop up near where the mouse was. {x=786, Y=476}{x=797, Y=687} any idea what may be going on here? No-e
-
OK, I am in the home stretch here, dynamic context menu over dynamic control arrays, for a guy new to .net. I have it all working except for one small, strange little thing. In my procedure to show the context menu, I thought I could just use the me.mouseposition. as follows:
Private Sub lblSlot_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
HandlePopup(sender, e) ' build my menu
Debug.Write(Me.MousePosition())
ContextMenu1.Show(Me, Me.MousePosition)
Debug.Write(Me.MousePosition())
End Subif I look at the output in the debug window pre and post clicking the mouse and seeing the popup, I will see something like the following: The menu does not pop up near where the mouse was. {x=786, Y=476}{x=797, Y=687} any idea what may be going on here? No-e
Take a look at the following two properties
PointToClient
PointToScreen
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Take a look at the following two properties
PointToClient
PointToScreen
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”