谢谢!

解决方案 »

  1.   

    以前写了一个
    在窗体上添加一个ProgressBar1Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As LongSub ProgressSetColor(lProgressBarHwnd As Long, lColour As Long, bForeground As Boolean)
        Const WM_USER = &H400, CCM_FIRST As Long = &H2000&
        Const CCM_SETBKCOLOR  As Long = (CCM_FIRST + 1), PBM_SETBKCOLOR As Long = CCM_SETBKCOLOR
        Const PBM_SETBARCOLOR As Long = (WM_USER + 9)
        
        On Error GoTo ErrFailed
        If bForeground Then
            Call SendMessage(lProgressBarHwnd, PBM_SETBARCOLOR, 0&, ByVal lColour)
        Else
            Call SendMessage(lProgressBarHwnd, PBM_SETBKCOLOR, 0&, ByVal lColour)
        End If
        Exit SubErrFailed:
        Debug.Print "Error in ProgressSetColor: " & Err.Description
        Debug.Assert False
    End SubPrivate Sub Form_Load()
        ProgressSetColor ProgressBar1.hwnd, RGB(255, 0, 0), True
        ProgressSetColor ProgressBar1.hwnd, RGB(192, 192, 192), False
        ProgressBar1.Value = 50End Sub
      

  2.   

    以前写了一个
    在窗体上添加一个ProgressBar1Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As LongSub ProgressSetColor(lProgressBarHwnd As Long, lColour As Long, bForeground As Boolean)
        Const WM_USER = &H400, CCM_FIRST As Long = &H2000&
        Const CCM_SETBKCOLOR  As Long = (CCM_FIRST + 1), PBM_SETBKCOLOR As Long = CCM_SETBKCOLOR
        Const PBM_SETBARCOLOR As Long = (WM_USER + 9)
        
        On Error GoTo ErrFailed
        If bForeground Then
            Call SendMessage(lProgressBarHwnd, PBM_SETBARCOLOR, 0&, ByVal lColour)
        Else
            Call SendMessage(lProgressBarHwnd, PBM_SETBKCOLOR, 0&, ByVal lColour)
        End If
        Exit SubErrFailed:
        Debug.Print "Error in ProgressSetColor: " & Err.Description
        Debug.Assert False
    End SubPrivate Sub Form_Load()
        ProgressSetColor ProgressBar1.hwnd, RGB(255, 0, 0), True
        ProgressSetColor ProgressBar1.hwnd, RGB(192, 192, 192), False
        ProgressBar1.Value = 50End Sub
      

  3.   

    还可以用PictureBox写进度条,用Line的方法显示进度
    有源代码
    如果需要请留e-mail
      

  4.   

    to  lihonggen0:
    我要是正是这种效果,谢谢!
      

  5.   

    免费彩色渐变进度条,需要的留email。
      

  6.   

    《免费彩色渐变进度条》,我要,谢谢[email protected]