diff --git a/Form1.cs b/Form1.cs index 8641404..1b44147 100644 --- a/Form1.cs +++ b/Form1.cs @@ -33,6 +33,17 @@ namespace ImageFrame this.Size = new Size(400, 600); // Initial size of the window this.Text = "Image Frame"; + // Use the executable's associated icon (set by the project) for the form and taskbar. + // After building the project the exe will have the app.ico icon and this will pick it up. + try + { + this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); + } + catch + { + // ignore if icon extraction fails; form will use default icon + } + // Top panel with buttons var topPanel = new FlowLayoutPanel(); topPanel.Dock = DockStyle.Top; diff --git a/ImageFrame.csproj b/ImageFrame.csproj index b57c89e..15cbdc1 100644 --- a/ImageFrame.csproj +++ b/ImageFrame.csproj @@ -6,6 +6,14 @@ enable true enable + + imageframe.ico + + imageframe.ico + + + + \ No newline at end of file diff --git a/imageframe-icon.png b/imageframe-icon.png new file mode 100644 index 0000000..bd42b9d Binary files /dev/null and b/imageframe-icon.png differ diff --git a/imageframe.ico b/imageframe.ico new file mode 100644 index 0000000..3f0fe14 Binary files /dev/null and b/imageframe.ico differ