LoginSignup
4
1

FolderBrowserDialogが変わってた???

Last updated at Posted at 2023-08-13

はじめに

フォルダを選択するダイアログはどんな物をイメージするか?
大体はこんな感じ
image.png
だと・・・ずっと思っていた、ついさっきまでは

環境

実施環境
・Windows 10 Professional
・Visual Studio 2022 Community Ver.17.7.0
・Visual Studio 2019 Community Ver.16.11.21
・C#

下記サイトのコードをそのまま使用

.NET Framework 4.X(4.8.1で確認)

冒頭の画像と同様の為、省略
※Win32APIのSHBrowseForFolderで表示される物

.NET5以降?(確認自体は.NET5/6/7それぞれ実施)

image.png
!?いつの間に・・・

FolderBrowserDialog.csのソースを覗く限り、PInvoke.SHBrowseForFolderを呼んでいるのは間違い無い様子だがこの差は何だろう???

見てる場所が悪い?間違い無い?方針転換した?仕様変更
情報求む
@radian-jp さん
@Ktouth さん
情報ありがとうございました

2024/02/24 追記/編集

編集箇所:FolderBrowserDialog.csのリンク先(格納先)が移動した事により編集
旧:https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms/src/System/Windows/Forms/FolderBrowserDialog.cs
新:https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms/src/System/Windows/Forms/Dialogs/CommonDialogs/FolderBrowserDialog.cs
※見返しで飛んだら404になってて焦ったわ…

4
1
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1