




























VB6,新建一个工程,在界面中放置一个进度条控件,输入如下代码:
Option Explicit
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const PBM_SETBARCOLOR = &H409
Private Const PBM_SETBKCOLOR = &H2001
Private Sub Form_Load()
PostMessage ProgressBar1.hwnd, PBM_SETBARCOLOR, 0, vbRed
PostMessage ProgressBar1.hwnd, PBM_SETBKCOLOR, 0, vbGreen
ProgressBar1.Value = 30
End Sub
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。