C#仿QQ皮肤-DateTimePicker 控件实现
2010-07-15 13:13
681 查看
原文:http://www.sufeinet.com/thread-2094-1-1.html
大家还是先来看看效果吧
代码
public void ResetBitmap()
{
this.NormalImage = Shared.NomalDrawButton;
this.MouseDownImage = Shared.MouseDownDrawButton;
this.MouseMoveImage = Shared.MouseMoveDrawButton;
}
protected override void OnValueChanged(EventArgs eventargs)
{
base.OnValueChanged(eventargs);
this.Invalidate();
} private void OverrideDropDown(Graphics g)
{
//if (!this.ShowUpDown)
//{
Rectangle rect = new Rectangle(this.Width - DropDownButtonWidth, 0, DropDownButtonWidth, this.Height);
//ControlPaint.DrawComboButton(g, rect, ButtonState.Flat);
//}
g.FillRectangle(new SolidBrush(Color.White), rect);
if (this.Enabled)
{
if (_mouseEnter)
{
g.DrawImage(this.MouseMoveImage, new Rectangle(this.Width - 20, 3, 16, 16));
}
else
{
g.DrawImage(this.NormalImage, new Rectangle(this.Width - 20, 3, 16, 16));
}
}
else
{
g.DrawImage(Shared.NotEnableDrawButton, new Rectangle(this.Width - 20, 3, 16, 16));
}
}
2.时间和日期绘制
..................
3.几个常用事件的处理
..................
下面是程序所有代码
原文:http://www.sufeinet.com/thread-2094-1-1.html
大家还是先来看看效果吧
代码
public void ResetBitmap()
{
this.NormalImage = Shared.NomalDrawButton;
this.MouseDownImage = Shared.MouseDownDrawButton;
this.MouseMoveImage = Shared.MouseMoveDrawButton;
}
protected override void OnValueChanged(EventArgs eventargs)
{
base.OnValueChanged(eventargs);
this.Invalidate();
} private void OverrideDropDown(Graphics g)
{
//if (!this.ShowUpDown)
//{
Rectangle rect = new Rectangle(this.Width - DropDownButtonWidth, 0, DropDownButtonWidth, this.Height);
//ControlPaint.DrawComboButton(g, rect, ButtonState.Flat);
//}
g.FillRectangle(new SolidBrush(Color.White), rect);
if (this.Enabled)
{
if (_mouseEnter)
{
g.DrawImage(this.MouseMoveImage, new Rectangle(this.Width - 20, 3, 16, 16));
}
else
{
g.DrawImage(this.NormalImage, new Rectangle(this.Width - 20, 3, 16, 16));
}
}
else
{
g.DrawImage(Shared.NotEnableDrawButton, new Rectangle(this.Width - 20, 3, 16, 16));
}
}
2.时间和日期绘制
..................
3.几个常用事件的处理
..................
下面是程序所有代码
原文:http://www.sufeinet.com/thread-2094-1-1.html
相关文章推荐
- C#仿QQ皮肤----基窗体FormBase与基用户控件FormBase1的实现
- C#仿QQ皮肤-GroupBox 控件实现(一)
- C#仿QQ皮肤----基窗体FormBase与基用户控件FormBase1的实现
- C#仿QQ皮肤-GroupBox 控件实现(一)
- C#仿QQ皮肤-TabControl控件实现
- C#仿QQ皮肤-TextBox 控件实现
- C#仿QQ皮肤-Label与ListBox 控件实现----寻求滚动条的解决方案
- C#仿QQ皮肤-Label与ListBox 控件实现----寻求滚动条的解决方案
- C#仿QQ皮肤-ContextMenuStrip 控件实现
- C#仿QQ皮肤-Button 控件实现
- C#仿QQ皮肤-TabControl控件实现
- C#仿QQ皮肤-常用用户控件EnterFrom1和窗体EntryForm的实现
- C#仿QQ皮肤-TextBox 控件实现
- C#仿QQ皮肤-CustomScrollbar 控件实现
- C#仿QQ皮肤----基窗体FormBase与基用户控件FormBase1的实现
- C#仿QQ皮肤----基窗体FormBase与基用户控件FormBase1的实现
- C#仿QQ皮肤----基窗体FormBase与基用户控件FormBase1的实现
- C#仿QQ皮肤-GroupBox 控件实现(一)
- C#仿QQ皮肤-TabControl控件实现
- C#仿QQ皮肤-实现原理系列文章