Visual Basic :

It is one of the very powerful programming language that help & develop, sophisticated, graphical application that can be run on microsoft windows environment.
Visual Basic is actually basic language [Beginner's All Purpose Symbolic Instruction Code] is developed in 1960 by professor John Kemeny Thomas Kurts.
Microsoft Window's GUI(Graphical User Interface) in the late 1980 & the early 1990. The Nutural evolution of Visual Basic was created by Microsoft Corporation in 1991 & Visual Basic 6.0 was created september 1998. Which is visual in nature.In general visual is method use to create GUI Application in visual programming stule involving a lot of graphic entities rather than writing numerious lines on code to describe the application function, etc. Visual Basic support, evendriven programming. 

A program in general computer developed in three ways : 
1.) In modular programming stule.
2.) In object oriented programming.
3.) In event driven programming stule.

IDE : - One of the most significant changes in Visual Basic 6.0. It is an integrar development environment, [IDE]. IDE is a term commonly used in the programming world to describe the interface & environment that we use to create our application.
It is called integrated because we can access Virtually all of the development tools that we need from one screen called an Interface.
The IDE is also commonly refers as the design environment or the program. IDE provide : (i.e. A program to create the program, Aprogram that execute the program, A  program that debugs the program.)

The Visual Basic IDE is made up of a number of components :
-> Menu Bar
-> Standard Toolbar
-> Project Explorer
-> Properties Windoe
-> Tool Box
-> Control
-> Form Layout Window
-> Form Design

Features of Visual Basic :

-> It is successor of Basic Languages.
-> It supports event driven programming.
-> It is a frontend.
-> It supports RAD [Rapid Application Development].
RAD :- The process of rapidly creating an application is typically reffered o as rapid application development. Visual Basic is the world's most widely used RAD language.

Objectives :

1.)  Visual Basic go programming environment working with forms.
2.)  Developing an application.
3.)  Variables & Datatypes.
4.)  Control Structure.
5.)  Modules in Visual Basic.
6.)  Procedure in Visual Basic.
7.)  Array in Visual Basic.
8.)  Working with control array.
9.)  Menus, Dialog Box, Events Graphics, MDI form & grid working with control.
10.) Create an Application.

Projects :-  A project is a group of all files that makes up a program. 
These might include forms:
1.) MDI Forms.
2.) Active Control
3.) Class
4.) S.Modules
5.) Data Rebort, etc.

Standard exe :-
A standard exe project is a typical application. 
This is used to create a standard execuitable files such as a basic windows application or to start a large application project.

Project Explorer :- 
The project explorer window shows the list of forms, modules, in a project. A visual basic project consists of a numbers of forms, consists of a number of forms controls, that make up an application & also display a hierarchical list of the project.

Title Bar :- It is top most-bar displaying the title of project.

Menu Bar :- 
 . Pull-down menu :-  The horizontal menu displayed below the title bar is menu bar & each option on the menu bar has a drop-down list of items, known as pull-down menu.

Tool Bar :-  A tool bar is a bar that displayed icon for commonly used tasks. The standard tool box of visual basic displayed icon of the most frequently used command in visual basic.

Tool Box :-  A tool box is a window that display a set of tools it may be used to place controls on form. The button on the tool box is used to create interface for application.

Control :-  Control is a pre-package components that we reuse instead of writing them your self 
This help us to write programs faster.

Form Layout Window:- The form layout window show how big a form is in relation to the screen .it also display the position of the force where it displayed when the project is run.

Properties Window :- The properties window open with the displayed . It more than one object is selected in common are displayed in the properties window.

Creating first program in visual basic to print basic text:-

Step 1:- Open the VB then select standard exe form a pop up window & click on open button or ↵

Step 2:- A form window will open containing command window & GUI window .


Step 3:- Click on properties window & project explore in tool bar to get the 
Floating windows for customize the tool & make an attractive. Which will appear right side of the form.



Step 4:- Draw text box form tool box.


Step 5:-  Create a button using command button to print the string in text box


Step 6:-  Double tap on command button which we have added & then write few line code to print the “HELLO WORLD”


Step 7:- Tap on start button which will be in tools bar [▶]. Then our project will start running.


How To Make A Simple Calculator Using Visual Basic:-

Step 1:- Open VB & Select Standard Exe Form A Pop Up 

Step 2:-  Now, Form Will Open In VB Then .

Try To Design Calculator  UI(User  Interface)

1.} Draw Three Lable :-

2.} Draw Three Text Box To Get Input & Display Results :-

3.} Draw Button (Like ‘+’, ’-’ , ’*’,  ‘/’) Using  Command And Button.

Step 3:-  Now we need to code for each operation by one . to write to perform operation need to double tap on command buttonto get /open/ activate code window and then,

Write Below Codes To Perform Specific Operation :-

• For addition (+) :-

    Private Sub Command1_Click()
    Text3.Text = Int(Text1.Text) + Int(Text2.Text)
    End Sub

• For subtraction (-) :-

    Private Sub Command2_Click()
    Text3.Text = Int(Text1.Text) - Int(Text2.Text)
    End Sub

• For Multiplication(*) :-

    Private Sub Command3_Click()
    Text3.Text = Int(Text1.Text) * Int(Text2.Text)
    End Sub

• For division (/) :-

    Private Sub Command4_Click()
    Text3.Text = Int(Text1.Text) / Int(Text2.Text)
    End Sub

Clear :- We can write here to erase or clear the text box to get fresh input in textbox .it also clear the results

Step 4:- Tap on start button which will be in tools bar [▶]. Then our project will start running.


Working with control 

1. Label Control :- A label control that display uneditable text to user. A label control is a graphical control , that is used to display some text, such as heading caption and message.

2. Text Box Control :- A control for accepting users input . Text box can also display text, also holds text that the user can either enter or change .that allows the user to fill the information & display it.


5. Option Box :-  It is also known as radio button. It is used in group where only one at a time can be true, that is allows us to display multiple choise from which user can choose only one.


6. Checkbox :-  A control that provides the user with a toggle choice (checked or unchecked). It checked the feature is used if unchecked the feature is not used.

Working with forms

Visual Basic has several diffrent types of object. The form is one of the most basic object in which the application developed. A form is a window that contain application code & has other form object placed on its to create the user interface. A form fill the entire screen, or have other forms contained within it, or it may be a custom dialogbox. Visual Basic initially include a default, form, Form1 file in each new prokect. We can change the forms name & caption to identify the purpose of the forms.
Every form object has its own properties, event, & method associated with it. 

Interface :- It is the visual part of an application by which the user interacts. As the name suggest there are two different interface. That is single document interface (SDI) & multiple document interface (MDI).

1.} SDI :- In SDI the only one document can curently open. That is the moment we open another documents the previously open document is cloased & then the new document is loded in it's window. e.g. Notepad, Paint, Wordpad, etc.

2.} MDI :- In MDI we can open multiple windows application, that allows us to display multiple document at the time in different windows. e.g. Ms Office, Visual Studio 6.0, .net product, oracle developer.

MDI Form :- This is the form for a VS application. This form visible like a darker background color. An MDI application must have at list two other forms.

a.} Parent Form      b.} Child Form

a. Parent Form :- This is the form which act as a container form. It holds one or more child form without a parent form child form can not exit.

b. Child Form :- This is the sub ordinate form which exist inside a parent form. All the link method & properties are created only through the parent. An MDI form can have multiple child form.

Forms Load & Display

1. Load : It loads a form into memory.
     Syntax : Form1
     Example: Load<form_name>

2. Show : To Show or display a form that we can use & show method.
     Syntax : Form1.show
     Example: Form_name.show

3. Unload : It unloads a form from memory.
     Syntax : unload<Form_name>
     Example: unload Forms
    
4. Hide : A form can be hidden by using hide method.
     Syntax : Form_name.hide
     Example: Form1.hide

Data Type & Variable

1. Data Types :- Data Types are means to identify the type of data & associated operations with its.

.  Categories of datatype

-> In Visaul Basic we can divide the datatype in two categories.

a.} Numeric Datatypes :- Numeric data types are the datatypes that consist of numbers, which can be used in calculation. In visual basic the numeric datatype can be represented in seven ways.


b.} Non-Numeric Datatypes :- Non-Numeric Datatypes are the datatypes that can not participate in calculation.

    Example : A string or true value or a stored form etc.
    These are basically five types of non-numeric datatypes:-


2. Variant :- It can holds data of any datatypes except string that have fixed length or datatypes. That have been created by users. It is default datatype for values, whoes datatypes are not specified or are unknown.

3. Variable :- A named storage location whoes contents can be varied is called variable. In visual basic to store temporarly value during the execution of an application variable have a name & datatype.

   Syntax :-  Dim <variable name> as datatype,
            <variable name> as datatype,
    <variable name> as datatype,
|                     |
|                     |
    <variable name> as  n

   Example :- 1.) Dim fee as Single, roll as Integer, name as String
                2.) Dim fee as Single, 
              roll as Integer, 
                name as String

* Dim :- The dim statement for declaring variable and allocating storage space in the memory.

# Type Declaration Character 
-> An alternative ways of specifying datatypes while declaring variable is the use of some special characters in place of datatypes. These special characters that specify the datatypes are known as type declaring character.

   Syntax : Dim <various name> <type declaration char>

   Example : 1.} Dim roll%
              2.} Dim fee@
              3.} Dim name$
              4.} Dim roll%, name$, fee@

Visual Basic supports two types of declaration :

1. Implicit Declaration :  When visual basic automatically create the variable without the declaring a variable.
   Example :-  Private sub command1_click()
  A = "Welcome to India"
  Print A
  End Sub

2. Explicit Declaration : Variable need to be declare with specific datatypes before it can be used,
   Example :-  Dim a as String
  Private sub command1_click()
  a = "Welcome to India"
  Print a
  End Sub

# Scope of variables 
1.) Local 
      Example :   Private sub command1_click()
   Dim a as String
   a = "Welcome to India"
   Print a
   End Sub

2.) Public
      Example :- Dim a as String
   Private sub command1_click()
   a = "Welcome to India"
   Print a
   End Sub

3.) Module
      Example :- Private sub command1_click()
   a = "Welcome to India"
   Print a
   End Sub

Input Function :- This function is used to get data from user. This function display a model dialoge box that aska us to enter some data.

Syantax : InputBox (Prompt Title)
Example : Private Sub Command_Click()
        a = InputBox("Enter name = ")
        End Sub

Rich Text Box :- This is one of the most powerful controlled provied by Visual Basic. It is a text box that is able to display text stored in rich text box format RTF.

Common Dialog Box :- It provides a standard set of dialog box for operation such as opening and saving files, setting print options and selecting color and font dialog box common dialog box control also provides helps dialog box.

Method of common dialog box...

1.) Showsave:- Display the common dialog control save  as dialog box.
Syntax:  showsave

2.) Showopen:- Display the common dialog control open dialog box.
Syntax:  common dialog1 showopen

3.) Showcolor:- The showcolor method is used to display a color dialog box to change the forecolor and back color of the text. It also permit them to define new custom color.
Syntax: common dialog1 showcolor

4.) Showfont:- Display the common dialog control font dialog box. It helps to select font name & font attributes like font size and font style.
Syntax:  common dialog1 showfont

5.) Formresize:- It helps to resize the form according to the device.

6.) Exit:- It helps to exit or end also can say close the program.