Programming Lesson 2
Page 1 of 1
Programming Lesson 2
Welcome back to VB programming lessons by Revilo410.
Before we learn some harder things lets practice what we learned last lesson:
TYPE , (Not copy and paste)! this into VB as practice!
Module Module1
Sub Main()
Console.WriteLine("Welcome to my first proper program")
Console.WriteLine("Press enter to continue")
Console.ReadLine()
Console.WriteLine("Well Done!")
Console.WriteLine("Now again")
Console.ReadLine()
Console.WriteLine("Bye")
Console.WriteLine("Press Enter")
Console.ReadLine()
End Sub
End Module
Done?
Now lets learn some more EASY things!
Lets make the console look more colourful!
In the programming area between sub main and end sub
Type:
Console.ForegroundColor = ConsoleColor.Cyan
Console.BackgroundColor = ConsoleColor.red
Console.writeline("Colours!!!")
Console.readline
NOTE: colour in the porgramming is spelt the american way "color" Console.foregroundCOLOR etc.
Foreground colour is the TEXT and background colour is what colour is BEHIND the text.
Another command is:
Console.clear
Try messing around with it to see what you can do!
See you in Lesson 3, where we will learn about comments and variables!
Before we learn some harder things lets practice what we learned last lesson:
TYPE , (Not copy and paste)! this into VB as practice!
Module Module1
Sub Main()
Console.WriteLine("Welcome to my first proper program")
Console.WriteLine("Press enter to continue")
Console.ReadLine()
Console.WriteLine("Well Done!")
Console.WriteLine("Now again")
Console.ReadLine()
Console.WriteLine("Bye")
Console.WriteLine("Press Enter")
Console.ReadLine()
End Sub
End Module
Done?
Now lets learn some more EASY things!
Lets make the console look more colourful!
In the programming area between sub main and end sub
Type:
Console.ForegroundColor = ConsoleColor.Cyan
Console.BackgroundColor = ConsoleColor.red
Console.writeline("Colours!!!")
Console.readline
NOTE: colour in the porgramming is spelt the american way "color" Console.foregroundCOLOR etc.
Foreground colour is the TEXT and background colour is what colour is BEHIND the text.
Another command is:
Console.clear
Try messing around with it to see what you can do!
See you in Lesson 3, where we will learn about comments and variables!
Revilo410- Forum Admin
- Posts : 1868
Join date : 2012-01-30
Age : 26
Similar topics
» Programming Lesson 1
» Programming Lesson 3
» Want to Learn Some Programming?
» learning a programming language
» Anyone wanting to learn C++ (who has previous knowledge of programming)
» Programming Lesson 3
» Want to Learn Some Programming?
» learning a programming language
» Anyone wanting to learn C++ (who has previous knowledge of programming)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
1/11/2022, 7:11 pm by Revilo410
» I've mined my final block. Thanks for the memories!
1/10/2022, 5:31 pm by madscientist032
» Shop :))
1/10/2022, 3:54 pm by Natalie220505
» Persephone's Application for Staff
1/8/2022, 6:39 pm by Tino6145
» Chx_Cat's member application
1/6/2022, 11:42 am by Beigecheetah485
» Rebeka_5's Oasian application
1/3/2022, 11:35 pm by Trai1
» Clausimodo Staff Application :)
1/2/2022, 1:14 am by halycone
» Application for member
1/1/2022, 7:36 pm by _Cepo
» Zaba's (really late) Introduction
1/1/2022, 8:53 am by halycone
» Zaba's Staff App
12/31/2021, 8:03 pm by King_Ralphio