开发者

SaveFileDialog or OpenFileDialog Control - Create/Modify Left-Side Folder Buttons

开发者 https://www.devze.com 2023-03-02 16:21 出处:网络
Is there a way to override/modify/create the left-side shortcut buttons in the SaveFileDialog or OpenFileDialog controls?

Is there a way to override/modify/create the left-side shortcut buttons in the SaveFileDialog or OpenFileDialog controls?

Defaults are "My Recent Documents", "Desktop", "My Documents", "My Computer", "My Network"... how would I change "My Recent Documents" to "My Super Cool Folder"?开发者_运维问答

Thanks.


You must be using an old operating system, XP era. The 'places bar' doesn't exist anymore in the Vista and Win7 version of the dialogs. What shows up in the old style dialogs is controlled by registry keys. That isn't exactly very suitable for modification by a single program. But this magazine article shows you what is needed.

The modern version shows 'Favorites' instead. They are simply .lnk files in the c:\users\name\links folder. You can find code to create a .lnk file in my answer in this thread.

Go easy on this, your user is not commonly likely to think that your folder is all that super cool. Unless she sets up a machine to only run your app and nothing much else. Consider setting the InitialDirectory property instead so that the dialog opens with your folder pre-selected.

0

精彩评论

暂无评论...
验证码 换一张
取 消