After studying this unit, you will be able to:
- Discuss visual basic elements
- Explain object-oriented programming in VB.NET
- Understand visual basic.net framework
- Discuss common type system
- Elaborate VB.NET features
- Explain .NET framework
- Understand VB.NET as a language in .NET framework
Computer programming, often shortened to programming, scripting, or coding is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.
This source code is written in one or more programming languages such as C++, C#, Java, Python, Smalltalk, etc. The purpose of programming is to create a set of instructions that computers use to perform specific operations or to exhibit desired behaviors. The process of writing source code often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic. Within software engineering, programming is regarded as one phase in a software development process.
Visual basic is a high level programming language developed from the earlier DOS version called BASIC. Visual Basic .NET is the latest technology introduced by Microsoft with tons of new features including the .NET framework. Educational institutes, Universities and Software Development companies have migrated to VB.NET now but Visual Basic 6 is still widely learned and taught.
Learning Visual Basic 6 is quite easier than other programming languages such as C++, C#, Java etc. This is because Visual Basic enables you to work in a graphical user interface where you can just drag and drop controls that you want to work with where you have to write bunches of code to create in C++ or C# or even in Java. If you are new to programming and want to start it in the smoothest and easiest way, then you should start it with Visual Basic.
Sometime in the July 2000, Microsoft announced a whole new software development framework for Windows called .NET in the Professional Developer Conference (PDC). Microsoft also released PDC version of the software for the developers to test. After initial testing and feedback Beta 1 of .NET was announced. Beta 1 of the .NET itself got lot of attention from the developer community.
When Microsoft announced Beta 2, it incorporated many changes suggested by the community and internals into the software. The overall ‘Beta’ phase lasted for more than 1 ½ years. Finally, in March 2002 Microsoft released final version of the .NET framework. One thing to be noted here is the change in approach of Microsoft while releasing this new platform.
Unlike other software where generally only a handful people are involved in beta testing, .NET Notes was thrown open to community for testing in its every pre-release version. This is one of the reasons why it created so many waves of excitement within the community and industry as well. Microsoft has put in great efforts in this new platform. In fact Microsoft says that its future depends on success of .NET.
The development of .NET is such an important event that Microsoft considers it equivalent to transition from DOS to Windows. All the future development –
including new and version upgrades of existing products – will revolve around .NET. So, if youwant to be at the forefront of Microsoft Technologies, you should be knowing .NET.
1.1 Elements of Visual Basic
The two basic elements of Visual Basic are the GUI and the code associated with the application that makes it respond to events occurred as a result of a user action.
1.1.1 Visual Element
IDE is a term commonly used in the programming world to describe the interface and environment that we use to create our applications. 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 referred to as the design environment, or the program.
The Visual Basic IDE is made up of a number of components:
- Menu Bar
- Tool Bar
- Project Explorer
- Properties Window
- Form Layout Window
- Form Designer
- Object Browser
1.1.2 Language Element
Microsoft Visual Basic code is written in units called procedures. A procedure contains a series of Visual Basic statements that perform an operation or calculate a value. An event procedure is a procedure that runs in response to an event initiated by the user or program code, or triggered
by the system. Its syntax is,
Private Sub button1_Click()