Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Added ProgressBar()
Browse files Browse the repository at this point in the history
  • Loading branch information
TyberiousG committed Apr 28, 2022
1 parent ddc510a commit a214323
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
Binary file modified .vs/SimpleConsoleControls/v17/.suo
Binary file not shown.
16 changes: 16 additions & 0 deletions Controls.vb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@
Console.SetWindowSize(columns, rows)
Console.SetBufferSize(columns + 2, rows + 2)
End Sub

Public Sub ProgressBar(ByVal X As Integer, ByVal Y As Integer, ByVal Width As Integer, ByVal Val As Integer, ByVal Optional BColor As ConsoleColor = ConsoleColor.Black, ByVal Optional FColor As ConsoleColor = ConsoleColor.White)
Console.SetCursorPosition(X, Y)
Console.Write("0% ")
For i = 1 To Width
Console.Write("▒")
Next
Console.Write(" 100%")
Dim OneBlock As Integer = 100 / Width
Dim DoneBlocks As Integer = (OneBlock * Val) / Width
Console.SetCursorPosition(X + 3, Y)
For d = 1 To DoneBlocks
Console.Write("█")
Next
End Sub

Public Sub DrawRectangle(ByVal X As Integer, ByVal Y As Integer, ByVal Width As Integer, ByVal Height As Integer, ByVal Optional BColor As ConsoleColor = ConsoleColor.Black, ByVal Optional FColor As ConsoleColor = ConsoleColor.White)
Dim CurrentFG = Console.ForegroundColor
Dim CurrentBG = Console.BackgroundColor
Expand Down
Binary file modified bin/Debug/SimpleConsoleControls.dll
Binary file not shown.
Binary file modified bin/Debug/SimpleConsoleControls.pdb
Binary file not shown.
Binary file modified obj/Debug/SimpleConsoleControls.dll
Binary file not shown.
Binary file modified obj/Debug/SimpleConsoleControls.pdb
Binary file not shown.

0 comments on commit a214323

Please sign in to comment.