珂珂的个人博客 - 一个程序猿的个人网站

最新发布

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(十)-右键菜单

admin 阅读(3120) 评论(0)

右键菜单的绘制有点特别 它是通过Renderer 属性,所以绘制部分是继承ToolStripProfessionalRenderer右键菜单的代码继承自ContextMenuStripusingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Windows.Forms; usingSystem.Drawing; usingSystem.Drawing.Drawing2D; usingSystem.ComponentModel; usingFYJ.Winform.Util; name [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(六)-按钮2

admin 阅读(2843) 评论(0)

还有一个继承自PictureBox的按钮,也是跟第一个原理差不多usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.ComponentModel; usingSystem.Drawing; usingSystem.Windows.Forms; usingFYJ.Winform.Util; namespaceFYJ.Winform.Controls { [DefaultEvent("Click")] publicclassImageButton:Syst [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(八)-文本框

admin 阅读(2540) 评论(0)

由于系统的TextBox不太好看,也自己重绘一个,没有继承自TextBoxusingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Drawing; usingSystem.Windows.Forms; usingSystem.ComponentModel; namespaceFYJ.Winform.Controls { publicpartialclassCommonTextBox:System.Windows.Forms.UserControl { privateGraph [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(七)-按钮3

admin 阅读(2906) 评论(0)

还实现了另外种按钮ImageButton 它是继承自PictureBox,并且不需要为按钮设置几张不同状态的图片如这个界面上的按钮就是这种这是鼠标移进去的效果 是重绘而来的usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.ComponentModel; usingSystem.Drawing; usingSystem.Windows.Forms; usingFYJ.Winform.Util; namespaceFYJ.Winform.Controls { [Default [...]   阅读全文

winform

FYJ.Winform皮肤-窗体组件-仿QQ调色面板(五)-按钮1

admin 阅读(3065) 评论(0)

由于是用的自定义的按钮,系统按钮不能满足要求,所以需要对控件进行一定扩展,如果是继承Button有时会出现黑框,所以继承UserControl并且实现IButtonControl接口写了5种状态,正常情况、进入按钮区域、按下按钮、移出按钮区域、按钮被禁用,这5种状态是换5张不同的图片,也可以是一张图片进行不同区域的截取usingSystem; usingSystem.Collections.Generic; usingSystem.Text; usingSystem.Drawing; usingSystem.ComponentModel; usingSystem.Windows.Fo [...]   阅读全文