# Pause Game and Show Pause Menu when game window is minimized or lost focus

**URL:** <https://forums.unrealengine.com/t/pause-game-and-show-pause-menu-when-game-window-is-minimized-or-lost-focus/1267782>\
**Category:** Blueprint\
**Tags:** windows, focus, lost, unreal-engine, pause, Blueprint, question\
**Created:** [August 21, 2023, 2:12pm UTC](https://forums.unrealengine.com/t/pause-game-and-show-pause-menu-when-game-window-is-minimized-or-lost-focus/1267782 "2023-08-21T14:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitrogen092](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nitrogen092](https://forums.unrealengine.com/u/nitrogen092)\
**Post date:** [August 21, 2023, 2:12pm UTC](https://forums.unrealengine.com/t/pause-game-and-show-pause-menu-when-game-window-is-minimized-or-lost-focus/1267782/1 "2023-08-21T14:12:18Z")

</div>

Hello! I need to pause the game and show my pause menu when the game window has lost focus (task manager is open, Alt+Tab is pressed, the game application is minimized, etc.). How to intercept this event?

---

<div class="post-metadata">

**Author:** ![AmrHamed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/amrhamed/32/1172489_2.png) [@AmrHamed](https://forums.unrealengine.com/u/AmrHamed)\
**Post date:** [March 8, 2024, 5:47pm UTC](https://forums.unrealengine.com/t/pause-game-and-show-pause-menu-when-game-window-is-minimized-or-lost-focus/1267782/2 "2024-03-08T17:47:56Z")

</div>

you can bind to FSlateApplication::OnApplicationActivationStateChanged and show your pause menu or do whatever logic you need.

something like this:

```auto
if (FSlateApplication::IsInitialized())
{
	FSlateApplication::Get().OnApplicationActivationStateChanged().AddUObject(this, &AMyPlayerController::OnApplicationDeactivated);
}

```
