Added icon to project
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user