5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【小ネタ】 Win+Mで最小化しないウィンドウを設定する

Last updated at Posted at 2025-09-18

[Tip] How to Exclude a Window from Win+M Minimization
Set Windows to Not Minimize with Win Key + M

WPFでは

<Window x:Class="InstantClipper.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:InstantClipper"
        mc:Ignorable="d"
        Loaded="Window_Loaded"
        Closed="Window_Closed"
        StateChanged ="Window_StateChanged"
        Title="MainWindow" Height="450" Width="800"
+        ShowInTaskbar="False"
        >

ShowInTaskbar="False" に設定するだけです

Winformの場合

  this.ShowInTaskbar = false;

WPFと同じか

WinUI3の場合

以下のようになっているそうです。

WindowEx.IsShownInSwithers

挙動

※いいねされない記事は削除されます

あとがき

実は10年越しの未解決タスクだったりします。

動画内のWindowはFree Aleram Clock(https://freealarmapp.com/jp/) で使用されているものですが(長年使用している)、最初はC++実装のBandicamに着目していました。
恐らくWPF製であろうFreeAleramClockでも動作したことで、根本的な見落としをしている可能性に気が付き(AIで$\color{blue}{\Tiny \textsf※1}$)プロパティを洗い出しました。

$\color{blue}{\Tiny \textsf{※1 この辺が手抜き}}$

ShowInTaskBar = Trueのときの挙動と比較することで、恐らくタスクバーが表示されていてもWin+Mの対象にならないように作れると考えられます。

何か判明次第、更新と追記を行う予定です(無駄に完璧主義なのどうにかしたい)

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?