OpenFileDialog 在 Windows 7 中不显示完整的文件名
OpenFileDialog 在 Windows 7 中不显示完整的文件名。还报告了该问题 connect.microsoft.com。
还有一种解决方法是设置 openFileDialog.AutoUpgradeEnabled = false
。但这会导致旧的 xp 样式对话框。有没有什么办法可以在不执行上述解决方法的情况下修复它。对话框中没有窗口句柄,因此我无法弄清楚如何添加自定义窗口消息处理程序来执行 sendmessage() 来修复它。
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.FileName = "abcdefghijklmnopqrstuvwxyz";
openFileDialog.ShowDialog();
}
OpenFileDialog does not show complete filename in Windows 7. The problem is also reported connect.microsoft.com.
There is also a work around by setting openFileDialog.AutoUpgradeEnabled = false
. But that causes old xp style dialog. Is there any way to fix it without doing the above workaround. There is no window handle in the dialog so i cannot figure out how to add custom window message handler to do sendmessage() to fix it.
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.FileName = "abcdefghijklmnopqrstuvwxyz";
openFileDialog.ShowDialog();
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 连接< /a> 还有另一个解决方法列出为:
我只有Win XP,所以我无法对此进行测试,希望这对您有所帮助。
On the Connect there is another workaround listed as:
I only have Win XP so I cannot test this, hope this helps.