Zum Hauptinhalt springen

Desktop Switcher [work] May 2026

public static void CloseCurrentDesktop()

void GetId(out Guid guid); void GetName(out string name);

private void LoadDesktops()

uint GetCount(); void GetAt(uint index, ref Guid riid, out IntPtr obj);

InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; this.TopMost = true; this.BackColor = Color.Black; this.Opacity = 0.85; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 300, 50); this.Size = new Size(280, 80); LoadDesktops(); refreshTimer = new Timer() Interval = 2000 ; refreshTimer.Tick += (s, e) => LoadDesktops(); refreshTimer.Start(); desktop switcher

[ComImport] [Guid("6b335ad5-2037-4456-9bd9-fbdbaaed4d87")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] interface IObjectArray

public static void CreateDesktop()

// Simulate Ctrl+Win+F4 InputSimulator.SendKeyDown(Keys.LWin); InputSimulator.SendKeyDown(Keys.Control); InputSimulator.SendKeyPress(Keys.F4); InputSimulator.SendKeyUp(Keys.Control); InputSimulator.SendKeyUp(Keys.LWin);