DrawFrameControl

[DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DrawFrameControl(
   IntPtr hdc,
   ref RECT lprc,
   uint uType,
   uint uState
);

Microsoft documentation: Link

Last updated