using System.Runtime.InteropServices;
[DllImport("User32.dll")]
public static extern int GetSystemMenu(int hWnd, int bRevert);
[DllImport("User32.dll")]
public static extern int RemoveMenu(int hMenu, int nPosition, int wFlags);
private void yourform_Load(object sender, System.EventArgs e)
{
int lSysMenu;
const int MF_BYPOSITION = 1024;
lSysMenu = GetSystemMenu(this.Handle.ToInt32(), 0);
RemoveMenu(lSysMenu, 6, MF_BYPOSITION);
}
浙公网安备 33010602011771号