drawmode好像只能设置以graphics方法或shape,line控件输出时的外观

解决方案 »

  1.   

    自己用 API 绘呀。 
    例:
    Declare Function SelectObject Lib "gdi32.dll" (ByVal hdc As Long, ByVal hObject As Long) As Long
    Declare Function CreateSolidBrush Lib "gdi32.dll" (ByVal crColor As Long) As Long
    Declare Function Rectangle Lib "gdi32.dll" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
    Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long Dim hbrush As Long  ' receives handle to the solid yellow brush
    Dim holdbrush As Long  ' receives handle to Form1's default brush
    Dim retval As Long  ' return valuehbrush = CreateSolidBrush(RGB(255, 255, 0))  ' create a solid yellow brush
    ' Save Form1's default brush so we can restore it after the program is finished
    holdbrush = SelectObject(Form1.hDC, hbrush)  ' select the brush
    ' Draw the rectangle filled using the solid yellow brush
    retval = Rectangle(Form1.hDC, 10, 20, 175, 100)
    ' Restore Form1's previous brush before destroying the created one
    retval = SelectObject(Form1.hDC, holdbrush)  ' select old brush
    retval = DeleteObject(hbrush)  ' destroy the solid yellow brush
      

  2.   

    DrawMode 属性返回或设置一个值,以决定图形方法的输出外观或者 Shape 及 Line 控件的外观。
    图形方法
    在如 Form、PictureBox 或 Printer 之类的对象上进行操作的方法,它执行运行时的绘图操作,如动画或模拟。图形方法有 Circle、Cls、Line、PaintPicture、Point、Print 和 Pset。
      

  3.   

    这样绘的不能是字符串好像使用TextOut也无效
      

  4.   

    http://vbsite.my5599.com/ocx/showdoc.asp?detail_id=737
    这个不错