Is there an easy way to create a C# .NET file dialog with encoding dialog box?

a 夏天 提交于 2019-12-11 01:44:43

问题


I'm trying to let the user select the file encoding when they load or save a file in C# and VS2008. Notepad's dialog boxes have an encoding drop down option at the bottom.

There is a way to do it as described in here: http://www.codeproject.com/KB/cs/getsavefilename.aspx.

However, I'm wondering if there is any easier way to do this. Windows must have this dialog built-in somewhere, isn't it?


回答1:


The dialog that is built in is the standard File Open dialog provided by the Win32 API. This dialog allows customization through the use of hooks, as described in the Code Project article you reference.

The process described in the article is the only way to do this and is what Notepad and Visual Studio are doing if they are really using the Win32 file open dialog and not one of their own making.



来源:https://stackoverflow.com/questions/1297659/is-there-an-easy-way-to-create-a-c-sharp-net-file-dialog-with-encoding-dialog-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!