OUR MUST POPULAR POST

Wednesday, July 17, 2013

Introduction to Visual Basic

Visual Basic is an ideal programming language for developing professional applications for Microsoft Windows environment. It makes use of graphical user interface (GUI) for creating robust and powerful applications.
Origin of Visual Basic lies in the old programming language called BASIC (Beginner’s All – purpose Symbolic Instruction Code). In 1970s, Microsoft started developing ROM – based interpreted BASIC for the early microprocessor based computers. In 1982, MS Quick BASIC revolutionized Basic and recognized as the serious development language for MS – DOS environment. Later on MS developed the enhanced version of BASIC called Visual Basic for Windows MS Visual Basic 6.0 requires at least MS – Windows 95 / NT 3.51 and 80486 processor with minimum 16 MB of RAM.
Before the evolution Visual languages (such as Visual Basic, Visual C++ etc), one had to execute the program in order to see how the program looks at the run time, but Visual Basic redefines the approach. Here in Visual Basic one can see at design – time (When the application is being developed) how the application will look like at the run – time.
The Visual part refers to the method used to create the Graphical User Interface and  Basic refers to the BASIC Language.
Visual Basic is actually much more than a mere programming language.  With Visual Basic one can build simple applications in minutes. It takes less time to develop software if compared to JAVA or VC++.
For companies developing custom applications, Visual Basic reduces development time and costs. Its intuitive interface makes Visual Basic an excellent tool for programmers. New users benefit from easy to use graphical user interface which is very user friendly; more advanced users benefit from ease-of-use features, such as drop-down list boxes and multiple-window applications.
Visual Basic provides the basis for the programming language used in all Microsoft Office applications, Microsoft Visual Basic for Applications, and for a variety of applications from other vendors.
Visual Basic supports a number of features that make it an excellent language for quickly creating full-featured solutions, including:
®Data access features
Data access features allow you to create databases, front-end applications, and scalable server-side components for most database formats, including Microsoft SQL Server and other enterprise-level databases.
®ActiveX technologies
ActiveX technologies allow you to use the functionality provided by other applications, like Microsoft Word processor, Microsoft Excel spreadsheet, and other Windows applications. You can even automate applications and objects created using the Professional or Enterprise editions of Visual Basic.
®Internet capabilities
Internet capabilities make it easy to provide access to documents and applications across the Internet, or an intranet, from within your application, or to create Internet server applications.
®Rapid Application Development (RAD)
®Support for multilingual applications
®Interactive debugging support

Editions Of Visual Basic:

MS – Visual Basic comes in three editions: Learning, Professional and Enterprise Edition.
Learning Edition :
The Visual Basic Learning Edition allows programmers to easily create powerful applications for Microsoft Windows and Windows NT. It includes all intrinsic controls, tab and data – bound controls.
Professional Edition :
The Visual Basic Professional Edition provides programmers a full –fledged set of tools for development. It includes all the features of Learning Edition plus additional ActiveX Controls , the Internet Information Server ( IIS ) Application Designer, Integrated Data tools and Data Environment, ActiveX Data Objects ( ADO ) and DHTL Page Designer.
Enterprise Edition :
The Visual Basic Professional Edition allows programmers to create robust distributed applications. It includes all the features of Professional  Edition plus Back Office Tools such as SQL Server, Microsoft Transaction Server ( MTS ), Internet Information Server    ( IIS ),  SNA Server, Visual Source Safe ( VSS ) and more.

 

Controls :

The introduction of ADO has led to the addition of few new controls such as the ADO DataControl. DataList Control, DataGrid Control, DataCombo Control. And HierarchicalflexGrid Control. With Dynamic Control Addition feature one can programmatically add and remove controls from the from without having to have an initial instance of a control.

Component Creation
The Most interesting enhancement to User control creation (component creation) is the capability to create data sources and data consumers. With this capability one can easily create own data control and customized it to particular needs.

Wizards

The setup Wizard has been enhanced and renamed as Package and Deployment wizard. Apart from this wizard some new wizards are being included. The data object wizard is used to create custom data sources and data consumers.

File Formats
Microsoft Visual Basic utilizes and creates a number of files at both design and run time which files will be required by your project or application depends upon its scope and functionality.

 


Design Time file formats

Extensions
Description
.bas
   Basic Module
.cls
   Class Module
.ctl
   User Control File
.ctx
   User Control Binary file
.dob
   ActiveX Document form file
.dsr
   Active Designer file
.frm
   From File
.frx
   Binary form file
.log
   Log File or load errors
.res
   Resources File
.vbp
   Visual Basic Project file

Common Terminology

The following table lists some of the key terms used in Visual Basic.
Terms
Description
Design Time
Any time an application is being developed in the Visual Basic environment
Runtime
Any time an application is running. At run time, the programmer
Controls
Graphical representation of the objects, such as buttons, list boxes and edit boxes that are used by the user to provide information to the application.
Objects
A general term used to describe all the forms and controls that make up a program.
Properties
Are the characteristics of an object such as size, caption or color.
Methods
The actions that an object can perform or that can be performed on the object.
Forms
Customizable windows that serve as the interface for an application or as dialog boxes used to gather information from the user.
Event
Actions recognized by a form or control. Events occur as the user, operating System or application interacts with the objects of a program.
Project
A visual Basic application is comprised of one or more components that are arranged under a project. The project is stored as a file with a .vdp extension.

 

Event - Driven Programming

In event-Driven Programming, the code is executed in response to events invoked by the user, operating system or application. This differs from procedural programming, where the program start at the first line code and follows a defined pathway, calling procedures as added.

Learning the Visual Interface – Integrated Development Environm

The Visual Basic is not just a language but it is a integrated Development Environment ( IDE ). IDE is basically a term commonly used in the programming world to describe the interface and environment where you develop, run, test and debug your applications.

The environment in Visual Basic is often referred to as the Integrated Development or IDE because many different functions such as design, editing, compiling, and debugging within a common environment.
Start Visual Basic and you will see the window shown below. This is where you are prompted to select the type of project you want to create.

Standard EXE :
A standard EXE project is a typical application. These are the types of applications that were available even with the previous versions of Visual Basic.

Types of Standard Exe

 

ActiveX EXE, ActiveX DLL:

These types of projects are available with the professional Edition. ActiveX Components are basic code-building components that don’t have a visible interface and can add special functionality to your applications. The two types of projects are identical in functionality, but are packed differently (as executable files or Dynamic Link Libraries).
ActiveX Control:
ActiveX (formerly OLE) Control programs modular programs designed to give a specific type of functionality to a parent application. An ActiveX control is implemented as an in-process server (typically a small object) that can be used in any OLE container. If the ActiveX controls that come with VB don’t provide the functionality that is needed one build own controls by using the ActiveX Control project.
ActiveX Document EXE. ActiveX Document DLL:
ActiveX documents are in essence Visual Basic applications that can run the environment of a container that supports hyperlinking.

Add-in Files

You can use the visual Basic extensibility object model to ease development through add-ins Add-ins are tools that you create programmatically using objects and collections in the extensibility model to customize and extend the Visual Basic environment.

VB Application Wizard:

The application wizard takes you through the steps of setting up the skeleton of a new application. The wizard manager lets you build in you own wizard. Wizard is a sequence of windows that collect information from the user. After the user fills out all the windows, the wizards proceeds to build an application, install software, or carry out an automated operation for the end user. Once the application is created, you can view and edit the code behind the functionality built into your new application to customize it to your needs.

Internet Information Server:

An IIS (internet Information Server) application is a Visual Basic application that lives on a web server and responds to requests from the browser. IIS applications uses HTML to present its user interface and uses complied Visual Basic code to process requests and respond to events in the browser.

DHTML:
A DMTML application is a group of a HTML pages that work together to perform a business process. One can write Visual Basic code to handle events that occur when these pages are viewed in the browser. You can respond to events that occur on any element on the page –from clicking a button to loading an image to passing the mouse over a certain part of the page.
In the New tab, you can select the type of a new project. Switch to the Existing tab to select an existing project and open it. To open a project you were working on recently, switch to the recent tab, which contains the list of the most recently opened projects.

Select the Standard EXE icon in the New project window, and then click OK to open the windows as shown in below.

The menu bar

  • File Contains commands for opening and saving project and creating executable files and list of recent projects.
  • Edit Contains editing commands (e.g. undo, copy, paste, cut) plus a number of commands for formatting and editing the code (e.g., find, replace)
  • View Contains commands for showing or hiding components of the IDE.
  • Project contains commands that add components to the current project, references to Windows objects and new tools to the toolbar.
  • Format contains for aligning the controls on the form.
  • Debug contains the usual debugging commands.
  • Run contains the commands that start, break, and the execution of the current application.
  • Query contains commands that simplify the design of structured query language queries. This menu is available when building database applications.
  • Diagram contains commands for editing database diagrams. This menu is available when building database applications.
  • Tools contains tools needed in building ActiveX Components and ActiveX Controls, contains the commands to start the menu editor and the option command, which lets to customize the environment.
  • Add-ins Contains add-ins that can be added and removed as needed. By default, only the visual Data manager add-in is installed in the menu. Use the add-in manager command to add and remove add-ins.
  • Window is the standard windows menu of an application that contains commands to arrange windows on the screen.
  • Help contains information to help as one with VB.

No comments:

Post a Comment

Thanks for comment me