这个在c#里面好像是实现不了的,建议你研究一下相关的api,只有用win32api解决

解决方案 »

  1.   


    这样做就可以了:
    [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);
    [DllImport("User32.dll")]
    public static extern int EnableMenuItem(int hMenu, int nIDEnableItem,int nEnable ); public const int MF_BYPOSITION = 1024;
    public const int MF_BYCOMMAND=0x00000000;
    public const int SC_CLOSE = 0xF060; //关闭
    public const int MF_DISABLED=0x00000002;
    public const int MF_GRAYED=0x00000001;private void button2_Click(object sender, System.EventArgs e)
    {
    int hMenu;
    hMenu = GetSystemMenu(this.Handle.ToInt32(), 0);
    //EnableMenuItem(hMenu, SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
    RemoveMenu(hMenu, 5, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); //'------'菜单项
    RemoveMenu(hMenu, 6, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); //关闭菜单项
    }
      

  2.   

    TO: hbxtlhx(下着春雨的天) 
    老大,你太伟大啦!!!!