OpenFileDialog in .NET FrameWork 4.8.1 - LongPath bug
needs-area-label
There a long path bug in OpenFileDialog when i try to open a file with path lenght > 260.
`Dim ofd As New OpenFileDialog()
ofd.Title = "Seleziona un file"
ofd.Filter = "Tutti i files|*.*"
ofd.InitialDirectory = "\\?\C:\Users\user\Documents"
If ofd.ShowDialog() <> DialogResult.OK Then Return`
ofd.ShowDialog() represents a MsgBox with an error of file doesn't exist.
Bye
<img width="939" height="525" alt="Image" src="https://github.com/user-attachments/assets/a84ae408-1adf-4ab7-8d7b-a033d22264b3" />
关闭于 2026-04-15 1 条评论