Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.11 KB

Readme.md

File metadata and controls

34 lines (26 loc) · 1.11 KB

Foregrounder

Nuget

Bring a window in your process to the foreground, even if a different process's window is currently in the foreground.

Requirements

  • Windows
  • A .NET desktop runtime, such as
    • .NET 5 or later
    • .NET Core 3.1 or later
    • .NET Framework 4.5.2 or later

Installation

dotnet add package Foregrounder

Usage

Foregrounder.Foregrounder.BringToForeground(myWindow);

myWindow can be

  • a Window from WPF
  • a Form from Windows Forms
  • an AutomationElement from UI Automation
  • a raw HWND window handle pointer

Acknowledgements