我可以在Visual Studio 2005中使用C#的透明按钮 [英] Can I create transparent buttons in Visual Studio 2005 with C#

查看:260
本文介绍了我可以在Visual Studio 2005中使用C#的透明按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要放置一些圆形按钮在C#项目,他们背后的一些数据的用户界面。这些按钮是System.Windows.Forms.buttons,我已经使用透明GIF图像来创建它们。然而,透明区域是不透明的。我看了网上的参考,但还没有找到如何做到这一点适当的任何建议。有一个在Visual Studio 2008中做了一些提,但我需要保持这个项目在2005年任何帮助或建议是AP preciated。

I have a user interface that requires placing some round buttons in a C# project with some data behind them. The buttons are System.Windows.Forms.buttons and I have used a GIF image with transparency to create them. However, the transparent areas aren't transparent. I've looked for references online but haven't found any suggestions for how to do this properly. There's some mention of doing it in Visual Studio 2008 but I need to keep this project in 2005. Any help or suggestion is appreciated.

推荐答案

只需设置按钮的 FlatStyle属性以平…瞧!我知道这工作与PNG图片,但我还没有与GIF格式进行了测试。

Just set the Button's FlatStyle property to "Flat"…and voilà! I know this works with PNGs, but I haven't tested it with GIFs.

这篇关于我可以在Visual Studio 2005中使用C#的透明按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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