From d249add4101031eebfc1a8e9ad33eef2d133bf16 Mon Sep 17 00:00:00 2001 From: Will Hilton Date: Wed, 16 Aug 2017 15:36:27 -0400 Subject: [PATCH] Fix taskbar icon and use spaces in taskbar title --- InvisibleLockScreen.csproj | 8 ++------ Properties/Resources.Designer.cs | 10 ++++++++++ Properties/Resources.resx | 13 ++++++++++--- Screensaver.cs | 10 ++++++---- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/InvisibleLockScreen.csproj b/InvisibleLockScreen.csproj index 251fbaa..00248a1 100644 --- a/InvisibleLockScreen.csproj +++ b/InvisibleLockScreen.csproj @@ -9,7 +9,7 @@ WinExe Properties InvisbleLockScreen - InvisbleLockScreen + Invisble Lock Screen v2.0 @@ -94,11 +94,7 @@ - - Always - - - + diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 569d968..398f778 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -59,5 +59,15 @@ namespace InvisbleLockScreen.Properties { resourceCulture = value; } } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon icon { + get { + object obj = ResourceManager.GetObject("icon", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } } } diff --git a/Properties/Resources.resx b/Properties/Resources.resx index af7dbeb..0415d21 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -114,4 +117,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\blank_screen.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Screensaver.cs b/Screensaver.cs index 6615c3b..bb9ee0a 100644 --- a/Screensaver.cs +++ b/Screensaver.cs @@ -520,7 +520,7 @@ namespace Screensavers #endif primary.FormBorderStyle = FormBorderStyle.None; primary.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; - primary.Icon = new Icon("Resources/blank_screen.ico"); + primary.Icon = InvisbleLockScreen.Properties.Resources.icon; foreach (Screen screen in Screen.AllScreens) { @@ -538,7 +538,7 @@ namespace Screensavers form.Size = screen.Bounds.Size; form.FormBorderStyle = FormBorderStyle.None; form.Text = primary.Text; - form.Icon = new Icon("Resources/blank_screen.ico"); + form.Icon = InvisbleLockScreen.Properties.Resources.icon; windows.Add(new Window(this, form)); } @@ -574,8 +574,9 @@ namespace Screensavers form.FormBorderStyle = FormBorderStyle.None; form.StartPosition = FormStartPosition.Manual; form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; + form.Icon = InvisbleLockScreen.Properties.Resources.icon; - windows = new WindowCollection(new Window[] { new Window(this, form) }); + windows = new WindowCollection(new Window[] { new Window(this, form) }); form.Show(); InitializeAndStart(); @@ -596,7 +597,8 @@ namespace Screensavers Form form = new Form(); form.FormBorderStyle = FormBorderStyle.FixedSingle; form.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; - form.StartPosition = FormStartPosition.CenterScreen; + form.Icon = InvisbleLockScreen.Properties.Resources.icon; + form.StartPosition = FormStartPosition.CenterScreen; form.BackColor = Color.Black; #if !DEBUG form.TopMost = true;