更改保存的默认设置,并在SaveFileDialog取消按钮 [英] Change default arrangement of Save and Cancel buttons in SaveFileDialog

查看:1046
本文介绍了更改保存的默认设置,并在SaveFileDialog取消按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我M在C#编码和我想改变'保存'的默认排列和SaveFileDialog取消按钮。默认设置是,保存按钮是取消按钮的上方。

I m coding in c# and I want to change the default arrangement of 'Save' and 'Cancel' buttons in SaveFileDialog. The default arrangement is that the 'Save' button is above the 'Cancel' button.

我要的是将取消按钮,在保存按钮的右侧。

What I want is to place 'Cancel' button on the right hand side of the 'Save' button.

我搜索了网页,发现,在这些按钮上的文本是可以改变的(这个问题的答案是在计算器本身),并没有发现改变自己的安排(地点)。

I searched over the web and found that the text on these buttons can be changed(to which the answer was on stackoverflow itself) and nothing found on changing their arrangements (locations).

请给我一个解决方案,如果你们任何人都有这样的经历至今....

Please give me a solution if any of you have experienced this so far....

感谢您

推荐答案

请不要这样做。

用户用来其中这些按钮出现。如果你试图改变它们的布局,那么你只会让你的应用程序感觉不对劲了。

The user is used to where these buttons appear. If you try to change their layout then you will just make you app feel wrong.

如果你这样做,则应该确保你使用传统的文件对话框(这将使你的对话看上去甚至在Vista / 7的多单数)。使用lpfnHook领域中的 OPENFILENAME 结构来获取到对话框过程挂钩。应对CDN_INITDONE通知和的MoveWindow或SetWindowPos左右移动的按钮。你必须去寻找按钮窗口句柄。

If you have to do this then should make sure you use the legacy file dialogs (which will make your dialogs look even more odd on Vista/7). Use the lpfnHook field in the OPENFILENAME struct to obtain hooks in to the dialog procedure. Respond to the CDN_INITDONE notification and move the buttons around with MoveWindow or SetWindowPos. You'll have to hunt for the button window handles.

不过说真的,请不要这样做,你只会让你的应用程序变得更糟。

But really, please don't do this, you'll just make your app worse.

这篇关于更改保存的默认设置,并在SaveFileDialog取消按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆