vs2005的控件都是矩形的,我想用圆形的按钮,要怎么设置?
解决方案 »
- 用户控件实现页面的切换
- c#2008 word统计,wordApp.ActiveDocument.ComputeStatistics,统计不了韩语
- Winfom ComboBox的问题
- 双重Dictionary 的使用
- C#使用MSCOMM的问题,(100分求助)!!!!!!!!!!!@@@@@@@@
- 关于Windouw编程中DataGrid的问题
- c#应用程序怎么才能生成EXE文件
- 如何记录下共享文件夹的会话信息?
- 388分求一个WIN2000的问题-如何获得用户的验证信息(用户名,验证时间,验证次数等)
- 问------请答?
- 安装部署项目中msi丢失问题
- 同时有多个摄像头,怎样运行特定的那个摄像头?
public class CicleButton : Button
{
protected override Render(HttpTextWriter output)
{
//...输出圆形的Html标记
}
}控件开发资料:
http://blog.csdn.net/ChengKing/category/288694.aspx
在WPF里面就简单了,自定义一个Style就行
http://download.csdn.net/source/792868
该例子是不规则窗体的,同样也支持按钮控件(Button)
目前只支持窗体和按钮
public class CircleButton : Control
{
public CircleButton()
{ } protected override void OnPaintBackground(PaintEventArgs pevent)
{
base.OnPaintBackground(pevent);
//
GraphicsPath path = new GraphicsPath();
path.AddEllipse(this.ClientRectangle);
this.Region = new Region(path);
}
}先把它添加到你的工程里面去,命名为CircleButton.cs即可在其他窗体中调用