作者mathlinka (Linka)
看板Visual_Basic
标题Re: [.NET] Console.Write 如何不换行取代原行文字?
时间Sat Jun 30 13:44:20 2007
我做出来的分享给大家,有需要的请自行参考~
Module mdlProgressBar
Dim oriTop As Integer
Dim oriLeft As Integer
Sub main()
Dim i As Integer
Dim sharpPercent As String
Console.WriteLine("开始执行")
For i = 0 To 100
oriTop = Console.CursorTop
oriLeft = Console.CursorLeft
Console.SetCursorPosition(0, oriTop)
sharpPercent = Right(StrDup((i \ 2) + 1, "#") & Space((100 - i) \ 2), 50)
Console.Write("进度: [" & sharpPercent & "] " & i & "%")
Threading.Thread.Sleep(100)
Next
Console.ReadLine()
End Sub
End Module
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.231.78.63
1F:推 seagal:nice job 06/30 17:26