Can you please tell me how can i get the top left position of annotation in respect to screen, i tried the following but didn't work correctly:
Code: Select all
Dim imgHorResolution As Int32 = gdPicEdit.HorizontalResolution
Dim imgVerResolution As Int32 = gdPicEdit.VerticalResolution
Dim TopLeftXPoint As Decimal = (_SelectedObject.Left - _SelectedObject.Width / 2) * imgHorResolution
Dim TopLeftYPoint As Decimal = (_SelectedObject.Top - _SelectedObject.Height / 2) * imgVerResolution
Dim p As New Point(TopLeftXPoint, TopLeftYPoint)
Return Me.gdPicEdit.PointToScreen(New Point(p.X, p.Y))