Imports System Imports System.Reflection Imports System.Windows.Forms Imports System.Runtime.CompilerServices Module Sample <Extension()> Public Sub MoveToCenter(ByVal f As Form) GetType(Form).InvokeMember("CenterToScreen", _ BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.InvokeMethod, _ Nothing, f, New Object() {}) End Sub End Module
Dim s As Size = Size.op_Subtraction(r.Size, Me.Size)
Dim s As Size = r.Size - Me.Size