Y
yououtthere
Hello All,
I have looked back through the postings in this group and there seems to be
a recognised problem with getting the MousePosition for a control when a
ContextMenu is assigned to that control. It seems that a tap 'n hold event
does not update the MousePosition. There doesn't seem to be a problem when
using the emulator only when running code on an actual device. The following
code shows this problem.
Private Sub ctxList_Popup(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ctxList.Popup
Dim hti As System.Windows.Forms.DataGrid.HitTestInfo
mousePoint = Me.grdList.PointToClient(Control.MousePosition)
hti = grdList.HitTest(mousePoint.X, mousePoint.Y)
If hti.Type = DataGrid.HitTestType.ColumnHeader Then
MsgBox("Header")
Else
MsgBox("Not Header")
End If
End Sub
When you click on a column header you will occasionally get the correct
message. I have not been able to find a resolution to this problem - Has any
one else? This seems to me to be a major Bug, but maybe that's because I
need the functionality.
TIA
Geoff
I have looked back through the postings in this group and there seems to be
a recognised problem with getting the MousePosition for a control when a
ContextMenu is assigned to that control. It seems that a tap 'n hold event
does not update the MousePosition. There doesn't seem to be a problem when
using the emulator only when running code on an actual device. The following
code shows this problem.
Private Sub ctxList_Popup(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ctxList.Popup
Dim hti As System.Windows.Forms.DataGrid.HitTestInfo
mousePoint = Me.grdList.PointToClient(Control.MousePosition)
hti = grdList.HitTest(mousePoint.X, mousePoint.Y)
If hti.Type = DataGrid.HitTestType.ColumnHeader Then
MsgBox("Header")
Else
MsgBox("Not Header")
End If
End Sub
When you click on a column header you will occasionally get the correct
message. I have not been able to find a resolution to this problem - Has any
one else? This seems to me to be a major Bug, but maybe that's because I
need the functionality.
TIA
Geoff