在不使用图像的情况下在 VBA 中创建更好看的按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7896068/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Create Better Looking Buttons in VBA without using Image
提问by Russell Saari
Is there anyway to create more rounded/professional looking buttons using vba. I found a couple places that suggested using images, which is not a terrible Idea, but I was wondering if anyone had a clue if there is a downloadable software, add-in, or anything. The ones currently available make my program look like an Mid 90's application. I really appreciate the help. I mean look at it!!
无论如何使用vba创建更圆润/专业外观的按钮。我找到了几个建议使用图像的地方,这不是一个糟糕的主意,但我想知道是否有人知道是否有可下载的软件、插件或任何东西。当前可用的程序使我的程序看起来像 90 年代中期的应用程序。我真的很感谢你的帮助。我的意思是看看它!
回答by Alex K.
Office VBA uses the Microsoft Forms Engine which is a lightweight (drawn) implementation of a GUI toolkit. Because of this the usual techniques used to customise button appearance on windows (owner-drawing/theming) don't apply and your stuck with what you've got.
Office VBA 使用 Microsoft Forms Engine,它是 GUI 工具包的轻量级(绘制)实现。因此,用于自定义窗口上按钮外观的常用技术(所有者绘图/主题化)并不适用,并且您会被现有的东西困住。
If you don't want to use images you need to find an ActiveX control that does the job, something like http://www.arcadiahome.com/products/components/activex/powerbutton.htm.
如果您不想使用图像,您需要找到一个可以完成这项工作的 ActiveX 控件,例如http://www.arcadiahome.com/products/components/activex/powerbutton.htm。