Top + inside, CornerRadius, CornerRadius, 270, 90) īottom - CornerRadius - inside - 1, CornerRadius, CornerRadius, 0, 90) īottom - CornerRadius - inside, CornerRadius, CornerRadius, 95, 95) GfxPath.AddArc(right - CornerRadius - inside - 2, GfxPath.AddArc(left + inside + 1, top + inside, CornerRadius, CornerRadius, 180, 100) GraphicsPath gfxPath = new GraphicsPath() Pen newPen = new Pen(BorderColor, BorderSize) GfxPath_mod.AddArc(left, bottom - CornerRadius, CornerRadius, CornerRadius, 90, 90) GfxPath_mod.AddArc(right - CornerRadius, bottom - CornerRadius, GfxPath_mod.AddArc(right - CornerRadius, top, CornerRadius, CornerRadius, 270, 90) GfxPath_mod.AddArc(left, top, CornerRadius, CornerRadius, 180, 90) GraphicsPath gfxPath_mod = new GraphicsPath() to modify the corner radius int CornerRadius = 18 to draw the control using base OnPaint base.OnPaint(pevent) Protected override void OnPaint(PaintEventArgs pevent) Void ButtonLastest_MouseDown( object sender, MouseEventArgs e)īackColor = ((( int)((( byte)( 84)))), Void ButtonLastest_MouseUp( object sender, MouseEventArgs e) This.MouseUp += new MouseEventHandler(ButtonLastest_MouseUp) This.MouseDown += new MouseEventHandler(ButtonLastest_MouseDown) we can use this to modify the border size public int BorderSize = 5 įlatAppearance.BorderColor = BorderColor įont = new ( " VAGRounded-Light",ģ0F,, , (( byte)( 0))) įoreColor = ((( int)((( byte)( 84)))), we can use this to modify the color of the border public Color BorderColor = Color.LightGray the modified button class looks like this class ButtonModified :
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |