Hides BetterJoy from Alt+Tab when minimised.

This commit is contained in:
David Khachaturov 2019-04-12 19:42:16 +01:00
parent 25d3fdbe20
commit 8200204438
5 changed files with 17 additions and 0 deletions

View file

@ -155,6 +155,7 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\bjfc.bmp" />
<None Include="FodyWeavers.xml" /> <None Include="FodyWeavers.xml" />
<Content Include="Icons\betterjoyforcemu_icon.ico" /> <Content Include="Icons\betterjoyforcemu_icon.ico" />
<Content Include="hidapi.dll"> <Content Include="hidapi.dll">

View file

@ -27,12 +27,15 @@ namespace BetterJoyForCemu {
this.WindowState = FormWindowState.Minimized; this.WindowState = FormWindowState.Minimized;
notifyIcon.Visible = true; notifyIcon.Visible = true;
notifyIcon.ShowBalloonTip(1); notifyIcon.ShowBalloonTip(1);
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
} }
private void ShowFromTray() { private void ShowFromTray() {
this.WindowState = FormWindowState.Normal; this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
this.Icon = Properties.Resources.betterjoyforcemu_icon;
notifyIcon.Visible = false; notifyIcon.Visible = false;
} }

View file

@ -60,6 +60,16 @@ namespace BetterJoyForCemu.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon betterjoyforcemu_icon {
get {
object obj = ResourceManager.GetObject("betterjoyforcemu_icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap. /// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary> /// </summary>

View file

@ -136,4 +136,7 @@
<data name="jc_right_s" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="jc_right_s" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\jc_right_s.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Icons\jc_right_s.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="betterjoyforcemu_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\betterjoyforcemu_icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB