What Is VB.NET:-
VB.NET is an object-oriented computer programming language. It is implemented in .NET Framework. Visual Basic.net was launched by Microsoft in 2002. It was launched as a successor of visual basic.
VB.net supports is abstraction, inheritance, and polymorphism.
VB.net supports OOP (object-oriented programming), that is, we can create class and object in it. Which increases code reusability.
visual basic.net is used to develop applications. These applications work with the .NET Framework.
VB.NET features:-
VB.NET features are as follows
1- GUI interface:- VB.NET is a graphical user interface (GUI) language. This means that users can interact and interact with the screen.
2- Object-oriented:- object-oriented is a programming language. That is, it supports the concept of class and object and it supports other features of OOPS.
3- Auto-complete:- The code editor of vb.net provides the facility of auto-complete. By which whenever the programmer writes the code, it is automatically completed which saves the time of the programmer.
4- windows form designer:- VB.net has windows form designer. By which the form can be designed.
5- IDE (integrated development environment):- It is a software application that allows developers to develop, run, test and debug the software.
6:- Assembly:-.DLI or.EXE file is an assembly that creates part of an application.
7:- Namespaces:- The namespace that is there organizes the objects present in the assembly. An assembly can have more than one namespace.
8:- Attributes:- attributes which are tags are those which provide additional information about the elements.
The attributes are most commonly used to explain the COM property of classes, interface, and methods, to explain assemblies, and to specify the security of methods.
9- Inheritance:- Through inheritance, we can create such a class as derived from the base class.
The advantage of inheritance is that we have to design only one bar in the class.
10- Multithreading:- Through multithreading, the application can handle many abstract tasks simultaneously.
11- VB.NET is a component-oriented language.
12- It can be learned easily.
13- It is a structured language.
VB.net Variable & variable declarations
VB.net variable
Today we will read about the vb.net variable in this post and read about its variable declaration, so let's start:-
Variable means the name of the storage area that our program can use. VB.Net has a specific type of all Variable, which determines the size and memory layout of Variable.
Following are some basic data types of VB.Net:
- Data type example
- Integral types
- Floating-point types
- Decimal types
- Boolean types
- Date types
VB.Net Variable Declaration
Dim Statement is used to store variable declaration and one or more variables.
Dim's full name is dimension.
A dim statement is used for module, class, structure, procedure or block level.
Syntax of vb.net Variable declaration is the following:
[<attributelist>] [accessmodifier] [[Shared] [shadow] [Static]]
[ReadOnly] Dim [WithEvents] variablelist
Where,
An attribute list means the list of attributes that are applied to the variable. This field is optional.
The access modifier is used to define the access levels of the variable, its value is - Public, Protected, Friend, Protected Friend and Private. This field is optional.
Shared is used to declare a shared variable that is not used with an instance of a specific class or structure but with all the classes or structures. This field is optional.
Read: Java Programming: History & Features [Object, Class, Inheritance, Encapsulation]
The value of the variable with which the Static is used, the procedure in which the variable is declared will be stored even after the termination of the procedure. This field is optional.
You cannot change the value of the variable with which ReadOnly is used. This field is optional.
WithEvents shows that the variable is used to respond to events. This field is optional. The variable list provides the list of the declared variable.
An attribute list means the list of attributes that are applied to the variable. This field is optional.
The access modifier is used to define the access levels of the variable, its value is - Public, Protected, Friend, Protected Friend and Private. This field is optional.
Shared is used to declare a shared variable that is not used with an instance of a specific class or structure but with all the classes or structures. This field is optional.
Read: Java Programming: History & Features [Object, Class, Inheritance, Encapsulation]
The value of the variable with which the Static is used, the procedure in which the variable is declared will be stored even after the termination of the procedure. This field is optional.
You cannot change the value of the variable with which ReadOnly is used. This field is optional.
WithEvents shows that the variable is used to respond to events. This field is optional. The variable list provides the list of the declared variable.
The syntax of each variable in the variable list is as follows:-
variable name [([boundslist])] [As [New] datatype] [= initializer]
Where,
- the variable name is the name of the variable.
- bounds list is used to declare the bound of the dimension of an array variable.
- New is used to create a new instance of the class.
- the data type is used to declare the data type of Variable.
What is IDE ? and its components
IDE [Integrated Development Environment]
The full name of IDE is an integrated development environment. It is a software application that allows developers to develop, run, test and debug software.
Generally, IDE consists of a code editor, a compiler, or an integrator and a debugger.
IDE has more features such as through this we can store the code online, format the code and optimize the code and it has a lot of plugins and extensions which is very helpful in creating a rich application.
The IDE's toolbar looks like a word processor. This is called IDE because we can access the necessary tools to develop the software application.
IDE components
The components of the IDE are as follows: -
1- IDE project window
We call the window title project-project1 as project explorer and it contains the project file. We usually call the project explorer window.
The toolbar of the project explorer contains three buttons named view code, view object and toggle folders.
When we press the view code button, a window is displayed to write the visual basic code in it.
When we press the view object button, it displays a form.
The toggle folders are what hide or show the forms folder.
2- Toolbar
It provides quick access to most commonly used commands while programming, that is, we can quickly access such commands which are used most often.
We can perform a task related to it by clicking a button in the toolbar. We can change the settings of the toolbar from the View menu.
3- Form designer:- For a software application, form objects are like building blocks. This is the window from which the user interacts at the beginning of the application. Forms have their own properties, events, and methods that we can control. The form window is a window where we draw our application.
4- Toolbox (toolbox):- The toolbox is a very large box with many different icons in it. This is the selection menu for controls. These controls are used to customize forms.
What controls are prepackaged components that can be used again? Through which we can write programs quickly.
Some of its controls are as follows:-
PictureBox - This control displays the image.
label- This control displays uneditable text to the user. the uneditable text means text that cannot be edited.
textBox - This control is to accept user input.
commandButton - This displays the control button.
Listbox - It provides a list of control items
comboBox - This control provides a shortlist of items.
Read: What is BackLink and how to create Quality Backlink For SEO?
Read: What is BackLink and how to create Quality Backlink For SEO?
5- Property window
The property window which displays properties for forms or controls is properties attributes like size, position, etc.
Like form, control also has its own unique properties. Some properties like width and height are similar in both, but apart from this other properties are different.
6- Menu bar:- menu bar displays the commands that are required to create applications. It is a horizontal strip that appears on top of the screen and it contains the names of menus.
IDE menu bar
file- It contains options to open, close, print, etc. of the project.
edit- It contains the options of cut, paste, undo, delete, find, etc.
view- This IDE displays the options to display Windows and toolbar.
project- It displays the options to add features to the project.
format- It contains the options to align and lock the control of the form.
debug - This includes debugging options.
run- It contains options to execute, stop the program.
diagram- It contains options to edit and view the design of the database.
tools– It contains options for IDE tools.
Add-ins- It contains the options to use, install, remove add-ins.
windows- It contains options to arrange and display the windows.
help- It contains options for taking the help.
7- form layout window
IDE form layout window:- The form layout window shows where your form will be displayed on the monitor screen.
What is OLE?
The full name of OLE is object linking & embedding. It is a Microsoft compound document technology supported the Component Object Model (COM).
OLE was proposed with Microsoft Windows 3.1.
Each object is an independent program entity that interacts with the user and also communicates with other desktop objects.
Generally, the object appears as an icon on the desktop. When we double click on the object, the application related to that object opens or it asks us to choose the application to edit that object.
For example-
1:- We have a spreadsheet of excel and we open it in the word application. When the spreadsheet opens in Word, the user interface of the spreadsheet loads. And inside the word document, we can manipulate the external data of the spreadsheet.
1:- We have a spreadsheet of excel and we open it in the word application. When the spreadsheet opens in Word, the user interface of the spreadsheet loads. And inside the word document, we can manipulate the external data of the spreadsheet.
2:- We can open an image/picture in a photo editing program like - photoshop and move it to word, excel or any other application.
Following are the applications supported by OLE:-
1:- Microsoft applications like - Excel, Word, Powerpoint.
2:- Corel WordPerfect
3:- AutoCAD
4:- Multimedia applications like - Audio, video, photos, etc.
5:- Adobe Acrobat.
OLE was later developed into a way larger standard called COM (components object model). But it is mainly used in Microsoft Windows. COM is the foundation of ActiveX through which developers create interactive content for the web.
The disadvantage of OLE:-
Following are the disadvantages caused by OLE:-
1– By embedded objects, the host document increases the file size, causing storage and loading problems.
2- linked objects can break if linked objects are placed in a location where there is no original document application.
3- If the linked and embedded object application is not available, then you cannot edit and manipulate the object.
VB.net User-Defined Data Types
Today we will read about the user-defined data types of vb.net in this post, so let's start:-
VB.NET has many in-built system default data types available such as Single, Double, String, Integer, long, etc. All these are also called primitive data types.
If a user needs any functionality other than these data types, or if he wants to use more than one such primitive data types as a single variable, then he can define the data type as per his requirement. It is called user-defined data types (UDT).
In VB.NET, User Defined Data Types are defined using the word 'Structure'. Whatever the requirements are within this structure, we can declare the variables of that data type.
For example:- we are creating an application such as the Employee Management System. In this system, we have to save the name of an employee, a unique employee id, contact number.
We can define the name of the Employee by String. If the Employee Id is a serial number, then you can define it with Integer. If you define each such variable according to its type, many variables can be created. All of them can be used by defining them within a structure. Here the syntax to define variables remains the same.
Syntax to define structure:
Structure structure_variable_name
We will define the variables of the structure here.
End structure
The Access Specifier tells where this structure can be used. If its value is 'Private', then it means that the structure in which the file is defined will be able to use it only in that file. If the value of Access Specifier is 'Public', it means that the structure can be used in all files of all projects. Similar and all access specifiers can be used.
If nothing is specified then the default value of Access Specifier is 'Public'.
If we see an example of a similar type, then if there is a student information system in which the details of the students have to be saved, the structure can be defined as follows:
Private Structure Student
Dim StudentId As Integer
Dim StudentName As String
Dim age as integer
‘End Structure
Here the name of the structure is Student and 3 variables are defined inside it.
This structure has been defined, now Dim will be used to create its instance such as Dim Student1 As Student
Here, Student1 is called Structure Variable, using which one can use its variables. Period Operator. Using the variable of Structure...
Read This:
Read This:
- How to create a responsive table inside Blogger?
- Top 8 Best Free Graphics Design Softwares For Windows
- Sabse Sasta Best Cheap Hosting | Cheap Web Hosting In India
Tags:
Programming
Superb and very extensive article on vb.net IDE. Very good post.
ReplyDeleteFull Form Of Computer Related Short Form | A To Z Computer Full Form
https://bollymoviereviewtech.com/
ReplyDeleteVisit blog!