Skip to content

Instantly share code, notes, and snippets.

@AEAEAEAE4343
AEAEAEAE4343 / ColorSchemeStruct.cs
Last active May 10, 2021
Windows color schemes registry reverse-engineered into a C# class
View ColorSchemeStruct.cs
public class ColorScheme
{
[StructLayout(LayoutKind.Explicit, Size = 712, Pack = 1)]
private struct ColorSchemeStruct
{
[FieldOffset(8)]
public byte WindowBorderSize;
[FieldOffset(12)]
public byte ScrollBarSize1;
[FieldOffset(16)]
@AEAEAEAE4343
AEAEAEAE4343 / SystemContextMenu.cs
Created Feb 11, 2021
System themed context menu for .NET Core and .NET 5.0 based Windows Forms applications
View SystemContextMenu.cs
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
namespace System.Windows.Forms
{
[Flags]
public enum SystemContextMenuItemFlags : uint
{