textbox的边框如何改变颜色?,重写也可以!
解决方案 »
- 如何连接天气服务器?
- 大家用过,ActiveRecord没有,感觉如何?
- begininvoke了的线程想立即强行终止,有啥办法啊?
- c#调用delphi开发的webservice接口,中文返回值为乱码(一个汉字返回???),如何进行转换?
- 如何移动ftp服务器上的文件
- 请教vs2005自带WEB树控件2.0的js操作方法
- 一个困扰我很久的问题。
- 怎么通过资源管理器形式选择文件?
- 我尝试获取Xml文件的根节点,失败了
- 当关闭主窗体时,我的程序为什么没有结束???
- Professional .NET Network Programming 代码,麻烦哪位朋友发一下吧,谢谢.
- 设置listBox的DOCK属性的怪问题?
public class MyTextBox: TextBox
{
....
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == WM_PAINT)
{
Graphics g = this.CreateGraphics();
g.DrawRectangle(Pens.Red, 0, 0, this.Width - 1, this.Height - 1);
g.Dispose();
}
}
.....
}
{
font-size: 8pt;
font-family: Verdana;
width: 100%;
height: 19px;
border: 1px solid #7b9ebd;
vertical-align: middle;
}
g.DrawRectangle(Pens.Red, 0, 0, this.Width - 1, this.Height - 1);
this.TextBox1 .BorderStyle = BorderStyle .Solid ;
this.TextBox1 .BorderColor = System.Drawing .Color .Red ;