Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Integer, ByVal nPosition As Integer,ByVal wFlags 1. As Integer) As
Public Declare Function GetSystemMenu Lib "user32.dll" (ByVal hwnd As IntPtr, ByVal bRevert As Boolean) As IntPtr
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Integer) As Integer
Public Const MF_DISABLED As Integer = &H2&
Public Const MF_BYPOSITION As Integer = &H400&
Public Function DisableMove(ByRef oForm As System.Windows.Forms.Form)
'
Call RemoveMenu(GetSystemMenu(oForm.Handle, False).ToInt32, 1, MF_DISABLED Or MF_BYPOSITION)
Call DrawMenuBar(oForm.Handle.ToInt32)
End Function




