public class MyGroupBox : GroupBox
{
    protected override void OnPaint(PaintEventArgs e)
    {
        base.OnPaint(e);
        ControlPaint.DrawBorder(e.Graphics, ClientRectangle,
                                     Color.Black, BORDER_SIZE, ButtonBorderStyle.Inset,
                                     Color.Black, BORDER_SIZE, ButtonBorderStyle.Inset,
                                     Color.Black, BORDER_SIZE, ButtonBorderStyle.Inset,
                                     Color.Black, BORDER_SIZE, ButtonBorderStyle.Inset);
    }
}

转自:Codeproject

Draw a Border around any C# Winform Control的更多相关文章

  1. WinForm Control - DataGridView

    http://blog.csdn.net/fangxing80/article/details/1561011 .NET 2.0 - WinForm Control - DataGridView 编程 ...

  2. DotNetBar ItemPanel添加WinForm Control

    int itemcount = 20; Random rd = new Random(); itemPanel1.Items.Clear(); for (int i = 0; i < itemc ...

  3. WinForm Control.Invoke&Control.BeginInvoke异步操作控件实例

    参考:http://www.cnblogs.com/yuyijq/archive/2010/01/11/1643802.html 效果图: 实例(实验)代码: using System; using ...

  4. A GDI+ Based Character LCD Control

    This is a renew. A GDI+ Based Character LCD Control by Conmajia Character liquid crystal display (LC ...

  5. 📟 Character Liquid Crystal Display Control (English)

    A replica CLCD module control. Initiated on May 5, 2012 Updated on Feb 21, 2017 Copyright 2012-2017 ...

  6. Java基础之在窗口中绘图——移动曲线的控制点(CurveApplet 3 moving the control points)

    Applet程序. import javax.swing.*; import java.awt.*; import java.awt.geom.*; import javax.swing.event. ...

  7. (转)使用Custom Draw实现ListCtrl的重绘

    使用Custom Draw实现ListCtrl的重绘   common control 4.7版本介绍了一个新的特性叫做Custom Draw,这个名字显得模糊不清,让人有点摸不着头脑,而且MSDN里 ...

  8. Java基础之在窗口中绘图——显示曲线的控制点(CurveApplet 2 displaying control points)

    Applet程序. import javax.swing.*; import java.awt.*; import java.awt.geom.*; @SuppressWarnings("s ...

  9. WinForm GDI+自定义控件总结(一)

    前言 由于项目的原因好久没写博客了,也正是项目的原因开始系统的学习WinForm,从而接触到自定义控件的开发.自定义控件的开发有一定的难度,对开发者要求比较高,需要了解Windows运行的机制,熟悉w ...

随机推荐

  1. asp.net页面使用doPostBack的后台取值

    前台页面(aspx文件): --伪装按钮 <span onclick='__doPostBack("lkSend","key")'>发送</s ...

  2. PHP汉字转拼音类

    看到的文章,转过来留用,哈哈 汉字转拼音类(全拼与首字母) <?php class GetPingYing { private $pylist = array( 'a'=>-20319, ...

  3. MySQL v5.1.72 + v5.6.19

    MYSQL是一个多线程的,结构化查询语言(SQL)数据库服务器.SQL 在世界上是最流行的数据库语言.MySQL 的执行性能非常高,运行速度非常快,并非常容易使用.是一个非常捧的数据库. MySQL ...

  4. 【iOS开发】企业版证书($299)In-House方式发布指南 (转)

    一.明确几个概念 1.企业版IDP:即iOS Development Enterprise Program.注意是$299/Year那种,并不是$99/Year的那种. 2.In House:是只企业 ...

  5. 【python练习】截取网页里最新的新闻

    需求: 在下面这个网页,抓取最新的新闻,按天划分. http://blog.eastmoney.com/13102551638/bloglist_0_1.html 实现方法1:使用递归 import ...

  6. 【django入门教程】Django的安装和入门

    很多初学django的朋友,都不知道如何安装django开发以及django的入门,今天小编就给大家讲讲django入门教程. 注明:python版本为3.3.1.Django版本为1.5.1,操作系 ...

  7. AFNetworking实现程序重新启动时的断点续传

    今天需要用AFNetworking实现断点续传的功能,但是在进行了一番研究之后,发现AFNetworking虽然支持下载文件的暂停和继续,但是程序重新启动后再次下载无法进行续传.网上有说可以通过AFD ...

  8. HTML的定位属性

    position    用于定义一个元素是否absolute(绝对),relative(相对),static(静态),或者fixed(固定) top层距离顶点纵坐标的距离 left层距离顶点横坐标的距 ...

  9. 原来DataTable的Distinct竟如此简单!

    DataView可以帮我们直接获取Distinct数据, DataTable dataTable;DataView dataView = dataTable.DefaultView; DataTabl ...

  10. C++学习笔记1:高级语言

    笔记参考资料:http://www.learncpp.com/ 1.high languages:C,C++,Pascal,Java,Javascript,Perl... compiling proc ...