Re: [.NET] Console.Write 如何不換行取代原行文字?

看板Visual_Basic作者 (Linka)時間17年前 (2007/06/30 13:44), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
我做出來的分享給大家,有需要的請自行參考~ 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

06/30 17:26, , 1F
nice job
06/30 17:26, 1F
文章代碼(AID): #16XUsrTN (Visual_Basic)
文章代碼(AID): #16XUsrTN (Visual_Basic)