Showing posts with label VB. Show all posts
Showing posts with label VB. Show all posts

Saturday, 14 March 2015

Visual Basic Programming for Beginners: Getting Started (02)

Before proceeding, do read Visual Basic Programming for Beginners: Introduction (01)

Well, in the previous blog we have gone through how to get things ready to learn Visual Basic and why we should learn VB and its importance in today's world.

Now we will start working on visual studio and will try to get familiar with it's interface and will build our first VB program.

Step 1:
Open visual studio 2013 on your desktop
Step 2:
Click on File ->New ->Project
Step 3:
Under Templates, Select Visual Basic and then Console Application
Step 4:
Name your project and click "Ok"

Will now have a window like this:
VB1


Now in the code editor window, you will have default code like this:

Module Module1

Sub Main()


End Sub

End Module



The above is your default VB code which must be there to start with.
where
Module Module1 is your main container of code and
Sub Main() is a sub procedure

Remember that in VB

  • Single line of code means single statement unlike C,C++,C# etc where you end with a semicolon(;) 
  • Each module or a procedure is end with END Keyword as you can see in above code. 
Now, Hello World Program in VB

Our purpose is just to Print A line of string On Console String on Console Window.



Module Module1
Sub Main()
Console.WriteLine("Hello World")
Console.ReadLine()
End Sub
End Module

In the Above Example Console is a class in WriteLine() and ReadLine() are member functions of this class used to write and read from consloe input.
This was pretty good.
Now Press "START" button to start running your application.
Your output Will be Like this:
VB2

 In the above code, the work of  Console.WriteLine("Hello World") was to print "Hello World" On console screen and the work of Console.Readline()Is same as that that of getch() in C that is to hold the output screen until a character is enterd.

So,today we have made our first VB program and learned a basic about it.
Till next post get yourself familiar with Visual Studio Environment and Do goggle about
  • Solution Explorer
  • Open new project in visual studio
  • Open Existing Project in Visual Studio
  • Properties bar
  • Error List in Visual Studio
Till then keep practicing and coding in Visual Basic 

Friday, 13 March 2015

Visual Basic Programming for Beginners: Introduction (01)

Welcome back readers....
From now on wards, your very appreciated blog "Let's Innovate" i.e http://makcs.blogspot.com will focus on Introduction to Visual Basic Programming.
Mean while you might also find other articles also but don't worry, the VB course will go on uninterrupted side-by-side.


For this series of module I'm going to use following things which you also need to have installed on your PC:

  • Windows 7 seven service pack 1(or above)
  • Visual Studio 2013
  • Interest to learn Visual Basic
If you have any problem with process listed above(regarding downloading, installing etc), please write to me on mywork78601@gmail.com

Why should I learn Visual Basic:

  • One of the commonly used programming language in today's scenario
  • Best and easy substitute of C#(C sharp)
  • Easy To Learn
  • No use of semicolons and curly braces(which makes programming complex)
  • Very Close to English language
  • Can be used standalone, with asp.net, to create console applications, web applications and many more
So I think above reasons a good enough to start with Visual Basic Programming.

Thing to be kept in mind:

  • Keep the IDE ready with you i.e Visual Studio
  • Best way to learn programming language is to practice by your own
  • Always type the code by your hands, don't just copy-paste
  • I'm just showing you the path, you have to walk on it
  • Don't keep quires, just comment them or mail it to me.
So, We will be meeting very soon to begin, till then get things ready.

You can download Visual studio 2013 free from here:
Click here

Till then keep coding...

[How to] Connect an android device [using MTP] on Linux [Ubuntu 14.04 LTS] 100% working

I recently moved to Linux[Ubuntu 14.04 ] from windows 8.1 because it hangs a lot on my lappy. Apart from the cool features of Ubuntu , one...