xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="mouseMoveWithPointer" Height="400" Width="500">
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Shapes
Imports System.Windows.Input
Namespace WpfApplication1
Public Partial Class Window1
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub MouseMoveHandler(sender As Object, e As MouseEventArgs)
' Get the x and y coordinates of the mouse pointer.
Dim position As Point = e.GetPosition(Me)
Dim pX As Double = position.X
Dim pY As Double = position.Y
ellipse.Width = pX
ellipse.Height = pY
End Sub
End Class
End Namespace