Hello Everyone,
I have decided to throw this code together so you can use it in your own console programs. The menu is VERY basic and can be worked to look a lot better.
The menu system works by having a list of options which can be selected with a number. After you have typed in the number and pressed enter it is then saved to a variable which is then called to display the option chosen.
Like I said it is was a VERY basic project and can be improved if you wish.
Screenshots of It Working:
Default Page:
![[Image: an4PgWu.png]](https://i.imgur.com/an4PgWu.png)
For Option 1 - 3:
![[Image: pgbX78r.png]](https://i.imgur.com/pgbX78r.png)
ChangeLog:
![[Image: bJzTawQ.png]](https://i.imgur.com/bJzTawQ.png)
Authors:
![[Image: 9024YLQ.png]](https://i.imgur.com/9024YLQ.png)
The Code:
I have decided to throw this code together so you can use it in your own console programs. The menu is VERY basic and can be worked to look a lot better.
The menu system works by having a list of options which can be selected with a number. After you have typed in the number and pressed enter it is then saved to a variable which is then called to display the option chosen.
Like I said it is was a VERY basic project and can be improved if you wish.
Screenshots of It Working:
Default Page:
![[Image: an4PgWu.png]](https://i.imgur.com/an4PgWu.png)
For Option 1 - 3:
![[Image: pgbX78r.png]](https://i.imgur.com/pgbX78r.png)
ChangeLog:
![[Image: bJzTawQ.png]](https://i.imgur.com/bJzTawQ.png)
Authors:
![[Image: 9024YLQ.png]](https://i.imgur.com/9024YLQ.png)
The Code:
Code
Module Module1
Dim choice As Integer
Dim backtomenu As String
Sub Main()
'Menu System Coded By PatientZero
Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine("--------------------------------")
Console.ForegroundColor = ConsoleColor.DarkGreen
Console.WriteLine("Basic Menu System By PatientZero")
Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine("--------------------------------")
Console.ForegroundColor = ConsoleColor.DarkGreen
Console.WriteLine("1> OPTION 1")
Console.WriteLine("2> OPTION 2")
Console.WriteLine("3> OPTION 3")
Console.WriteLine("4> View ChangeLog")
Console.WriteLine("5> View Authors")
Console.WriteLine("6> Exit")
Console.ForegroundColor = ConsoleColor.Red
Console.WriteLine("--------------------------------")
Console.ForegroundColor = ConsoleColor.DarkGreen
choice = Console.ReadLine()
Console.WriteLine()
Select Case choice
Case Is = 1
Option1()
Case Is = 2
Option2()
Case Is = 3
Option3()
Case Is = 4
ChangeLog()
Case Is = 5
Authors()
Case Is = 6
MenuExit()
End Select
End Sub
Sub Option1()
Console.Clear()
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Temporary Placeholder For Option 1")
Console.WriteLine()
Console.WriteLine("To Return To Menu Press M, Or To Exit Press ENTER")
backtomenu = Console.ReadLine()
MenuReturn()
End Sub
Sub Option2()
Console.Clear()
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Temporary Placeholder For Option 2")
Console.WriteLine()
Console.WriteLine("To Return To Menu Press M, Or To Exit Press ENTER")
backtomenu = Console.ReadLine()
MenuReturn()
End Sub
Sub Option3()
Console.Clear()
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Temporary Placeholder For Option 3")
Console.WriteLine()
Console.WriteLine("To Return To Menu Press M, Or To Exit Press ENTER")
backtomenu = Console.ReadLine()
MenuReturn()
End Sub
Sub ChangeLog()
Console.Clear()
Console.WriteLine("~~~~~ CHANGELOG ~~~~~")
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("[+] Version 1.0 Of Basic Menu System")
Console.WriteLine()
Console.WriteLine("To Return To Menu Press M, Or To Exit Press ENTER")
backtomenu = Console.ReadLine()
MenuReturn()
End Sub
Sub Authors()
Console.Clear()
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Program Name: Basic Menu System")
Console.WriteLine("Program Author: PatientZero")
Console.WriteLine("Last Updated: 03/10/2014")
Console.WriteLine()
Console.WriteLine("To Return To Menu Press M, Or To Exit Press ENTER")
backtomenu = Console.ReadLine()
MenuReturn()
End Sub
Sub MenuReturn()
If backtomenu = "M" Then
Console.Clear()
Main()
Else
MenuExit()
End If
End Sub
Sub MenuExit()
Console.Clear()
Console.ForegroundColor = ConsoleColor.Green
Console.WriteLine("Thank You For Using Our Program")
Console.WriteLine("Basic Menu System Coded By PatientZero")
Console.WriteLine()
Console.WriteLine("Please Press ENTER To Confirm Exit")
Console.ReadLine()
End Sub
End Module


![[Image: vjPWhyy.gif]](https://i.imgur.com/vjPWhyy.gif)
