Public Class frmChooseMapPos

    Private _X As Integer
    Public Property X() As Integer
        Get
            Return _X
        End Get
        Set(ByVal value As Integer)
            _X = value
        End Set
    End Property

    Private _Y As Integer
    Public Property Y() As Integer
        Get
            Return _Y
        End Get
        Set(ByVal value As Integer)
            _Y = value
        End Set
    End Property

    Private Sub pic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pic.Click
        Me.DialogResult = Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub pic_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pic.MouseMove
        Dim xPos As Integer = e.Location.X * 2
        Dim yPos As Integer = e.Location.Y * 2

        Me.Text = "Click to choose.      x = " & xPos & "  ,  y = " & yPos

        Me.X = xPos
        Me.Y = yPos
    End Sub
End Class