draw a black line and a white line, then put they on near place(not same place)

解决方案 »

  1.   

    you can do your UserControl
      

  2.   

    打开tool菜单的option项,在general页签下将align control to grid项前面的勾消去,控件就不会自动对齐到网格。
      

  3.   

    另一种方法:
    用“DrawEdge”绘制!
    edge设为:BDR_SUNKENOUTER Or BDR_RAISEDINNER
    grfFlags设为:BF_LEFT 或 BF_TOP 或 BF_BOTTOM Or BF_DIAGONALPrivate Declare Function DrawEdge Lib "user32" (ByVal hdc As Long, qrc As RECT, ByVal edge As Long, ByVal grfFlags As Long) As LongPrivate Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
    End Type
    Private Const BDR_SUNKENOUTER = &H2 '外层凹
    Private Const BDR_RAISEDINNER = &H4 '内层凸Private Const BF_LEFT = &H1
    Private Const BF_TOP = &H2
    Private Const BF_BOTTOM = &H8
    Private Const BF_DIAGONAL = &H10