Jump to content

[Visual Basic] Simple Console Application


DH01
 Share

Recommended Posts

Tutorial: How to Create a Simple Console Application that Prints Text

 

Difficulty: Extremely Easy

Time to Complete: Around 2 - 3 minutes

You need: Microsoft Visual Basic 2008 or higher

Method:

 

File >> New >> Project >> Select Console Application >> Re-name it to whatever you like >> Press Ok

 

To start of you should get this, if you don't please start the top procedure again (where I said to go to file etc.) because you probably pressed the wrong one. So, after you have made your new project, the base code should look like this:

 

Module Module1

   Sub Main()

   End Sub

End Module
 

 

Press enter underneath "Sub Main()" and type this code; Console.WriteLine("Anything can be placed here")

So the code up to now should look like this:

 

Module Module1

   Sub Main()
       Console.WriteLine("Anything can be placed here")
   End Sub

End Module
 

 

Nearly done now, just need to add one more line underneath; Console.WriteLine("Anything can be placed here")

Press enter under that button and type the following code; Console.ReadLine()

So now your final and finished code should look like this:

 

Module Module1

   Sub Main()
       Console.WriteLine("Anything can be placed here")
       Console.ReadLine()
   End Sub

End Module
 

 

If you have had any problems making this, contact me by PM'ing me or using the post feature below. I accept feedback and don't forget to give me a +!

Edited by Cdorsu
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.