なんとなく気になったので…。行数は短いので全行をコピってみます。
using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows.Forms; namespace ShellAboutSample { public partial class Form1 : Form { [DllImport("shell32.dll")] static extern int ShellAbout(IntPtr hWnd, string szApp, string szOtherStuff, IntPtr hIcon); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { ShellAbout( this.Handle, "ああああのバージョン情報#いいいい " + Assembly.GetExecutingAssembly().GetName().Version.ToString(), "うううう", IntPtr.Zero); } } }
APIのリファレンスはShellAbout functionに記載されています。szApp(第2引数)は#の記号を含めると、#の前までがタイトルバーに、#の後ろがダイアログの1行目に表示されます。
Windows10だと、ライセンスがされている個人、組織がuser name、org nameと表示されるのですが、そういう仕様みたいです。
PInvoke – ShellAbout (Shell32) – Windows 10
ただ、Windowsの標準アプリ(例えば、メモ帳)のバージョン情報では名前が表示されるので、もしかしたらWindowsの標準アプリでは呼び出している関数が違うのかもしれません。
“Windows標準のバージョン情報を表示する” への1件のコメント
個人名・組織名ですが、
x64 Windowsで x64 アプリ: 正しく表示される
x64 Windowsで x86 アプリ: user name, org nameになる
x86 Windowsで x86 アプリ: 正しく表示される
となります。
x64: C:\Windows\System32\notepad.exe
x86: C:\Windows\SysWow64\notepad.exe
と明示的にビット数を選択して起動すると簡単に確認できます。
結局ただのバグですね… たぶんこんなとこ誰も見てないんです