I want to disable the right-top side of menu. Why can't the following code work ?

Private Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long


Private Sub Form_Load()
hMenu = GetSystemMenu(Me.hwnd, 0)
DeleteMenu hMenu, 6, MF_BYPOSITION
End Sub