VB.net 写出progress bar的code

/" 只是给progress bar 的code
Sub RenderProgressBar(ByVal intMaxValue As Integer, ByVal intProgress As Integer, ByVal intLeftPos As Integer, ByVal intTopPos As Integer)
/"display result
Dim strResult As String
/"给多少percent progress 的counter
Dim intPercent As Integer

/“如果已经到了max progress…就display出result
If (intMaxValue > 0) Then
intPercent = Math.Round((intProgress / intMaxValue) * 100, 0)
If intPercent >= 10 Then
strResult = “| “ & intPercent & “% |” & StrDup(intPercent \ 10, “=”) & StrDup(10 - (intPercent \ 10), ” “) & “|”
Else
strResult = “| “ & intPercent & “% |” & StrDup(10, ” “) & “|”
End If
Else
/" 如果不是max progress, display 出在prosess中的percentage
intPercent = intProgress
strResult = “| “ & FormatNumber(intPercent, 0) & ” |”
End If
Console.CursorVisible = False
Console.SetCursorPosition(intLeftPos, intTopPos)
Console.Write(strResult)
Console.CursorVisible = True
End Sub

脚本?????

看不明白。。。没有用过 VB

引用第1楼天使vs恶魔于2008-12-17 10:31发表的 :
脚本?????

coding来的。。。分享一下而已

引用第2楼juzhax于2008-12-17 10:36发表的 :
看不明白。。。没有用过 VB

哦。。。怎么解释才比较让人明白呢?