Skip to content

Commit 258c7dc

Browse files
R3FR4GR3FR4G
authored andcommitted
Added a basic icon, might be changed in the future
1 parent 371d50c commit 258c7dc

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Text-File-Displayer/Project1/Program.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,12 @@ static Form MakeForm(System.Drawing.Size size, System.Drawing.Color backcolor, s
340340
form.StartPosition = FormStartPosition.CenterScreen;
341341
form.BackColor = backcolor;
342342
form.Text = windowTitle;
343-
//removed icon atm because i'm too lazy to do an other one lol
344-
//form.Icon = new Icon("icon.ico");
343+
try
344+
{
345+
form.Icon = new Icon("icon.ico");
346+
form.ShowIcon = true;
347+
}
348+
catch { }
345349
form.ShowIcon = true;
346350
return form;
347351
}

Text-File-Displayer/Project1/Project1.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<PropertyGroup>
35-
<ApplicationIcon>
36-
</ApplicationIcon>
35+
<ApplicationIcon>icon.ico</ApplicationIcon>
3736
</PropertyGroup>
3837
<PropertyGroup>
3938
<StartupObject />
@@ -49,5 +48,10 @@
4948
<Reference Include="System.Windows.Forms" />
5049
<Reference Include="WindowsBase" />
5150
</ItemGroup>
51+
<ItemGroup>
52+
<Content Include="icon.ico">
53+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
54+
</Content>
55+
</ItemGroup>
5256
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5357
</Project>
98.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)