Skip to content

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

License

Notifications You must be signed in to change notification settings

Aldaviva/Foregrounder

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

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Languages