アプリを作成しましたが、デフォルトアイコンだと視認性が悪いのでオリジナルアイコンを設定してみます。
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/202207061924.jpg?resize=160%2C90&ssl=1)
アイコンは以下のスクリプトで作成したものを使いました。
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2020/10/202010300944.png?resize=160%2C90&ssl=1)
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/202207061924.jpg?resize=160%2C90&ssl=1)
よく使う文字列を登録しボタンを押すとクリップボードにコピーするアプリ
ソースコードなどを記事に埋め込むため「Highlighting Code Block」というワードプレスのプラグイン使っています。 そのプラグインで使用されるタグの暗記を試みましたが、筆者の記憶装置が経年劣化により暗記が難しいのでアプリを作...
アイコンは以下のスクリプトで作成したものを使いました。
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2020/10/202010300944.png?resize=160%2C90&ssl=1)
PowerShellでアプリケーションアイコンを作ってみる。
ビットマップからアイコンを取得することが出来るようなので試してみました。 $outPath = "./output.ico" $Bitmap = ::new(64, 64, ::Format24bppRgb) $g = ::FromImag...
プログラムソース
ファイル名:TextTemplate.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationIcon>E:\csharp\wpf\TextTemplate\output.ico</ApplicationIcon>
</PropertyGroup>
</Project>
ファイル名:MainWindow.xaml
<Window x:Class="TextTemplate.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TextTemplate"
mc:Ignorable="d"
FontSize="12pt"
Icon="E:\csharp\wpf\TextTemplate\output.ico"
Title="TextTemplate" Height="450" Width="800">
以下略
実行
ショートカットファイルのスクリーンショット
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/2022-07-08053405.jpg?resize=337%2C175&ssl=1)
アプリケーションアイコンのスクリーンショット
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/20220708053553.jpg?resize=1024%2C576&ssl=1)
タスクバーに表示されたアイコンのスクリーンショット
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/20220708053444.jpg?resize=187%2C171&ssl=1)
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/2022-07-08053405.jpg?resize=337%2C175&ssl=1)
アプリケーションアイコンのスクリーンショット
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/20220708053553.jpg?resize=1024%2C576&ssl=1)
タスクバーに表示されたアイコンのスクリーンショット
![](https://i0.wp.com/maywork.net/wp/wp-content/uploads/2022/07/20220708053444.jpg?resize=187%2C171&ssl=1)
コメント