UNIT I INTRODUCTION TO VISUAL BASIC INTRODUCTION Visual

UNIT -I INTRODUCTION TO VISUAL BASIC

INTRODUCTION �Visual Basic is an object-oriented programming development system for creating applications that run under any of the MS-Windows environment. �VB is an event driven programming language. �Visual Basic’s Integrated Development Environment (IDE) allows the programmer to create, run and debug Windows programs in one application

FEATURES �Data Access - Allows the user to create applications for most of the database formats including MS SQL server, MS-Access, etc. , �Active. X Technology -Allows user to use the functionality provide by applications such as MS Word, MS excel and other Windows applications

�Internet Capabilities - Makes it easy to provide access to documents and applications across the Internet. �DLL(Dynamic Link Library) - The application can be freely distributed �IDE(Integrated Development Environment) - Standard. EXE, which is highlighted by default, allows the programmer to create a standard executable

VB IDE Toolbar Toolbox Immediate window menu bar Properties window Form layout

VB IDE COMPONENTS �Menu Bar: contains all commands needed to run VB (File, Edit, View etc…). �Toolbars: quick access to commonly used menu commands. �Project Explorer: displays the project’s components. �Toolbox: contains icons of the controls that can be placed on the project’s Forms to create the application’s interface. �Properties Window: Shows the property settings of the selected control (size, caption, color, etc…).

VB IDE COMPONENTS (Cont’d) �Form Designer: Main window in which one can design and edit the application’s user interface. In this window the user can enter and edit the application’s code. It displays two windows: Form and Code window. �Form Layout: Shows the initial positions of the forms in the application. It is useful in multiple forms applications. �Immediate Window: Debugging tool.

EVENTS The GUI environment is event-driven • An event is an action that takes place within a program • – Clicking a button (a Click event) – Keying in a Text. Box (a Text. Changed event) Visual Basic controls are capable of detecting many, many events • A program can respond to an event if the programmer writes an event •

METHODS �The action taken when the event occurs is called a Method �A Method is piece of code that accomplishes a task. �When an ‘Event’ occurs to ‘Control’ some ‘Methods’ are invoked. �Ex: Form 1. move Form 1. refresh
- Slides: 9