EnableMenuItem

[DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnableMenuItem(
   IntPtr hMenu,
   uint uIDEnableItem,
   uint uEnable
);

Microsoft documentation: Link

Last updated