Public Class Form1 Const WM_NCHITTEST As Integer = &H84 Dim HTBOTTOM As New IntPtr(15) Dim HTTOP As New IntPtr(12) Dim HTBOTTOMLEFT As New IntPtr(16) Dim HTBOTTOMRIGHT As New IntPtr(17) Dim HTTOPLEFT As New IntPtr(13) Dim HTTOPRIGHT As New IntPtr(14) Dim HTNOWHERE As New IntPtr(0) Protected Overrides Sub WndProc(ByRef m As Message) MyBase.WndProc(m) If m.Msg = WM_NCHITTEST Then 'Debug.Print(m.Result) '出力してみると楽しいです If HTBOTTOM.Equals(m.Result) OrElse _ HTTOP.Equals(m.Result) OrElse _ HTBOTTOMLEFT.Equals(m.Result) OrElse _ HTBOTTOMRIGHT.Equals(m.Result) OrElse _ HTTOPLEFT.Equals(m.Result) OrElse _ HTTOPRIGHT.Equals(m.Result) Then m.Result = HTNOWHERE End If End If End Sub End Class