没有这一概念!
需要建立画笔、刷子并用SelectObject选入

解决方案 »

  1.   

    【函数】
    CreatePen【操作系统】
    Win9X:Yes
    WinNT:Yes【声明】
    CreatePen Lib "gdi32" Alias "CreatePen" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long【说明】  用指定的样式、宽度和颜色创建一个画笔 【返回值】  Long,如函数执行成功,就返回指向新画笔的一个句柄;否则返回零 【其它】  一旦不再需要画笔,记得用DeleteObject函数将其删除【参数表】
      nPenStyle ------  Long,指定画笔样式,可以是下述常数之一
      PS_SOLID
      画笔画出的是实线
      PS_DASH
      画笔画出的是虚线(nWidth必须是1)
      PS_DOT
      画笔画出的是点线(nWidth必须是1)
      PS_DASHDOT
      画笔画出的是点划线(nWidth必须是1)
      PS_DASHDOTDOT
      画笔画出的是点-点-划线(nWidth必须是1)
      PS_NULL
      画笔不能画图
      PS_INSIDEFRAME
      画笔在由椭圆、矩形、圆角矩形、饼图以及弦等生成的封闭对象框中画图。如指定的准确RGB颜色不存在,就进行抖动处理  nWidth ---------  Long,以逻辑单位表示的画笔的宽度  crColor --------  Long,画笔的RGB颜色
    --------------------------------------------------------------------
    【函数】
    CreateSolidBrush【操作系统】
    Win9X:Yes
    WinNT:Yes【声明】
    CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long【说明】  用纯色创建一个刷子 【返回值】  Long,如执行成功,返回新刷子的一个句柄;否则返回零 【其它】  一旦刷子不再需要,就用DeleteObject函数将其删除【参数表】
      crColor --------  Long,数字的RGB彩色
    --------------------------------------------------------------------
    另,一定要用SelectObject选入
    --------------------------------------------------------------------
    Made by Thirdapple's Studio(http://3rdapple.51.net/)
      

  2.   

    CreatePen VB声明 
    Declare Function CreatePen Lib "gdi32" Alias "CreatePen" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long 
    说明 
    用指定的样式、宽度和颜色创建一个画笔 
    返回值 
    Long,如函数执行成功,就返回指向新画笔的一个句柄;否则返回零 
    参数表 
    参数 类型及说明 
    nPenStyle Long,指定画笔样式,可以是下述常数之一 
    PS_SOLID 画笔画出的是实线 
    PS_DASH 画笔画出的是虚线(nWidth必须是1) 
    PS_DOT 画笔画出的是点线(nWidth必须是1) 
    PS_DASHDOT 画笔画出的是点划线(nWidth必须是1) 
    PS_DASHDOTDOT 画笔画出的是点-点-划线(nWidth必须是1) 
    PS_NULL 画笔不能画图 
    PS_INSIDEFRAME 画笔在由椭圆、矩形、圆角矩形、饼图以及弦等生成的封闭对象框中画图。如指定的准确RGB颜色不存在,就进行抖动处理 
    nWidth Long,以逻辑单位表示的画笔的宽度 
    crColor Long,画笔的RGB颜色 
    注解 
    一旦不再需要画笔,记得用DeleteObject函数将其删除
     CreateSolidBrush VB声明 
    Declare Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As Long 
    说明 
    用纯色创建一个刷子 
    返回值 
    Long,如执行成功,返回新刷子的一个句柄;否则返回零 
    参数表 
    参数 类型及说明 
    crColor Long,数字的RGB彩色 
    注解 
    一旦刷子不再需要,就用DeleteObject函数将其删除
     
      

  3.   

    【VB声明】
      Private Declare Function SetTextColor Lib "gdi32" Alias "SetTextColor" (ByVal hdc As Long, ByVal crColor As Long) As Long【说明】
      设置当前文本颜色。这种颜色也称为“前景色” 【返回值】
      Long,文本色的前一个RGB颜色设定。CLR_INVALID表示失败。会设置GetLastError 【参数表】
      hdc ------------  Long,设备场景的句柄  crColor --------  Long,新的文本色
      在VB里使用
      如改变了这个设置,注意恢复VB窗体或控件原始的文本颜色例子:
    'Example by Alexey ([email protected])
    'This example requires one command button (Command1)Option Explicit
    Private Declare Function timeGetTime Lib "winmm.dll" () As Long
    Private Declare Function SetTextCharacterExtra Lib "gdi32" _
    (ByVal hdc As Long, ByVal nCharExtra As Long) As LongPrivate Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
    End TypePrivate Declare Function OffsetRect Lib "user32" (lpRect _
    As RECT, ByVal x As Long, ByVal y As Long) As LongPrivate Declare Function SetTextColor Lib "gdi32" (ByVal hdc _
    As Long, ByVal crColor As Long) As LongPrivate Declare Function FillRect Lib "user32" (ByVal hdc As _
    Long, lpRect As RECT, ByVal hBrush As Long) As LongPrivate Declare Function CreateSolidBrush Lib "gdi32" (ByVal _
    crColor As Long) As LongPrivate Declare Function DeleteObject Lib "gdi32" (ByVal _
    hObject As Long) As LongPrivate Declare Function GetSysColor Lib "user32" (ByVal _
    nIndex As Long) As LongPrivate Const COLOR_BTNFACE = 15Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" _
    (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal _
    lpString As String, ByVal nCount As Long) As LongPrivate Declare Function DrawText Lib "user32" Alias "DrawTextA" _
    (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, _
    lpRect As RECT, ByVal wFormat As Long) As LongPrivate Const DT_BOTTOM = &H8
    Private Const DT_CALCRECT = &H400
    Private Const DT_CENTER = &H1
    Private Const DT_CHARSTREAM = 4 ' Character-stream, PLP
    Private Const DT_DISPFILE = 6 ' Display-file
    Private Const DT_EXPANDTABS = &H40
    Private Const DT_EXTERNALLEADING = &H200
    Private Const DT_INTERNAL = &H1000
    Private Const DT_LEFT = &H0
    Private Const DT_METAFILE = 5 ' Metafile, VDM
    Private Const DT_NOCLIP = &H100
    Private Const DT_NOPREFIX = &H800
    Private Const DT_PLOTTER = 0 ' Vector plotter
    Private Const DT_RASCAMERA = 3 ' Raster camera
    Private Const DT_RASDISPLAY = 1 ' Raster display
    Private Const DT_RASPRINTER = 2 ' Raster printer
    Private Const DT_RIGHT = &H2
    Private Const DT_SINGLELINE = &H20
    Private Const DT_TABSTOP = &H80
    Private Const DT_TOP = &H0
    Private Const DT_VCENTER = &H4
    Private Const DT_WORDBREAK = &H10Private Declare Function OleTranslateColor Lib "olepro32.dll" _
    (ByVal OLE_COLOR As Long, ByVal hPalette As Long, pccolorref As Long) As Long
    Private Const CLR_INVALID = -1Public Sub TextEffect(obj As Object, ByVal sText As String, _
    ByVal lX As Long, ByVal lY As Long, Optional ByVal bLoop _
    As Boolean = False, Optional ByVal lStartSpacing As Long = 128, _
    Optional ByVal lEndSpacing As Long = -1, Optional ByVal oColor _
    As OLE_COLOR = vbWindowText)Dim lhDC As Long
    Dim i As Long
    Dim x As Long
    Dim lLen As Long
    Dim hBrush As Long
    Static tR As RECT
    Dim iDir As Long
    Dim bNotFirstTime As Boolean
    Dim lTime As Long
    Dim lIter As Long
    Dim bSlowDown As Boolean
    Dim lCOlor As Long
    Dim bDoIt As BooleanlhDC = obj.hdc
    iDir = -1
    i = lStartSpacing
    tR.Left = lX: tR.Top = lY: tR.Right = lX: tR.Bottom = lY
    OleTranslateColor oColor, 0, lCOlorhBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE))
    lLen = Len(sText)SetTextColor lhDC, lCOlor
    bDoIt = TrueDo While bDoIt
    lTime = timeGetTime
    If (i < -3) And Not (bLoop) And Not (bSlowDown) Then
    bSlowDown = True
    iDir = 1
    lIter = (i + 4)
    End If
    If (i > 128) Then iDir = -1
    If Not (bLoop) And iDir = 1 Then
    If (i = lEndSpacing) Then
    ' Stop
    bDoIt = False
    Else
    lIter = lIter - 1
    If (lIter <= 0) Then
    i = i + iDir
    lIter = (i + 4)
    End If
    End If
    Else
    i = i + iDir
    End IfFillRect lhDC, tR, hBrush
    x = 32 - (i * lLen)
    SetTextCharacterExtra lhDC, i
    DrawText lhDC, sText, lLen, tR, DT_CALCRECT
    tR.Right = tR.Right + 4
    If (tR.Right > obj.ScaleWidth \ Screen.TwipsPerPixelX) Then _
    tR.Right = obj.ScaleWidth \ Screen.TwipsPerPixelX
    DrawText lhDC, sText, lLen, tR, DT_LEFT
    obj.RefreshDo
    DoEvents
    If obj.Visible = False Then Exit Sub
    Loop While (timeGetTime - lTime) < 20Loop
    DeleteObject hBrushEnd SubPrivate Sub Command1_Click()
    Me.ScaleMode = vbTwips
    Me.AutoRedraw = True
    Call TextEffect(Me, "Hello World!", 12, 12, False, 128)
    End Sub【VB声明】
      Private Declare Function GetTextColor Lib "gdi32" Alias "GetTextColor" (ByVal hdc As Long) As Long【说明】
      判断当前字体颜色。通常也称为“前景色” 【返回值】
      Long,文字的当前RGB颜色设置。如果出错,会返回CLR_INVALID。会设置GetLastError 【备注】
      在VB里用ForeColor属性设置图片控件和窗体【参数表】
      hdc ------------  Long,设备场景的句柄
      

  4.   

    Dim TemphPen as long,OldhPen as long
    Dim TemphBr as long,OldhBr as longTemphPen=CreatePen(VbSolid, 1, &HFF) '创建红色的画笔
    TemphBr=CreateSolidBrush(&HC000&) '创建绿色的刷子'选入部件
    OldhPen=SelectObject(hDC, TemphPen)
    OldhBr=SelectObject(hDC, TemphBr)'绘制一个矩形
    Rectangle hDC, 10, 10, 90, 90'选出部件
    Call SelectObject(hDC, OldhPen)
    Call SelectObject(hDC, OldhBr)'删除部件
    Call DeleteObject(TemphPen)
    Call DeleteObject(TemphBr)