打印本文 打印本文 关闭窗口 关闭窗口
自定义控件--xp风格按钮(可设置文字颜色)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数8779  更新时间:2009/4/25 0:44:49  文章录入:mintao  责任编辑:mintao
        ''''高光点

        PaintBack(g, SystemColors.ControlLightLight)

    End Sub

 

 

    ''''绘制背景色

    Private Sub PaintBack(ByVal g As Graphics, ByVal c As Color)

        ''''填充时采用:单色画刷,相对与(00)坐标(33)的位置,大小为宽-6,高-6

        g.FillRectangle(New SolidBrush(c), 3, 3, Width - 6, Height - 6)

    End Sub

    ''''写文本

    Private Sub WriteText(ByVal g As Graphics)

        ''''计算文本的位置

        Dim x As Integer = 0

        Dim y As Integer = 0

        ''''size用宽高有序对表示矩形区域

        Dim s As Size = g.MeasureString(Text, Font).ToSize()

 << 上一页  [11] [12] [13]  下一页

打印本文 打印本文 关闭窗口 关闭窗口