Dustin#1793
I've been struggling with this for some time, I know it's probably simple, but I need some help. I have a Form in VB.NET where I need to enable a user to create an Ellipse on a canvas by drag and drop. I have a PictureBox on the Form that a user can drag and drop onto a layer of of the MultiLayerViewer, but on the DragDrop event, I can never seem to create an Elliple at the location the user dropped.
Any help or pointing in the right direction would greatly be appreciated.
My code is as follows:
Any help or pointing in the right direction would greatly be appreciated.
My code is as follows:
Private Sub _multiLayerViewer_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles _multiLayerViewer.DragDrop
Dim a As Aurigma.GraphicsMill.WinControls.VObject
Dim Pt As Point
Pt = Me.PointToClient(New Point(e.X, e.Y))
Pt.Offset(-DragPoint.X, -DragPoint.Y) ' DragPoint is being set when user begins drag
a = New Aurigma.GraphicsMill.WinControls.EllipseVObject(Pt.X, Pt.Y, 10, 10)
_multiLayerViewer.CurrentLayer.VObjects.Add(a)
End Sub