Skip to content

Instantly share code, notes, and snippets.

View EddyLuten's full-sized avatar

Eddy Luten EddyLuten

View GitHub Profile
@gsuberland
gsuberland / MoveDisplays.cs
Created November 25, 2021 04:08
Move displays programmatically on Windows in C#
// quick bit of code to move displays to specific locations in C#
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct DEVMODE
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;