请使用这段代码.<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> SysMenu: HMENU;<br> MenuItemInfo: TMenuItemInfo;<br> MenuName: string;<br> CommandPool: TBits;<br>begin<br> MenuName:='Test';<br> CommandPool := TBits.Create;<br> SysMenu := GetSystemMenu(Handle, False);<br> DeleteMenu(SysMenu, SC_TASKLIST, MF_BYCOMMAND);<br> DeleteMenu(SysMenu, 7, MF_BYPOSITION);<br> DeleteMenu(SysMenu, 5, MF_BYPOSITION);<br> DeleteMenu(SysMenu, SC_MAXIMIZE, MF_BYCOMMAND);<br> DeleteMenu(SysMenu, SC_MINIMIZE, MF_BYCOMMAND);<br> DeleteMenu(SysMenu, SC_SIZE, MF_BYCOMMAND);<br> DeleteMenu(SysMenu, SC_RESTORE, MF_BYCOMMAND);<br> MenuItemInfo.cbSize := 44; // Required for Windows 95<br> MenuItemInfo.fMask := MIIM_CHECKMARKS or MIIM_DATA or MIIM_ID or<br> MIIM_STATE or MIIM_SUBMENU or MIIM_TYPE;<br> MenuItemInfo.fType := MFT_STRING;<br> MenuItemInfo.fState := MFS_UNCHECKED or MFS_ENABLED;<br> MenuItemInfo.wID := CommandPool.OpenBit;<br> MenuItemInfo.hSubMenu := 0;<br> MenuItemInfo.hbmpChecked := 0;<br> MenuItemInfo.hbmpUnchecked := 0;<br> MenuItemInfo.dwTypeData := PChar(MenuName);<br> InsertMenuItem(SysMenu, DWORD(-1), True, MenuItemInfo);<br> CommandPool.Free;<br>end;<br>