1 / 16

VISUAL BASIC 5.0 INTRODUCTION

VISUAL BASIC 5.0 INTRODUCTION. Version Date: August 31, 1998. VB General Information. VB is an event-driven (-oriented) language A “Form” is a container for other forms and controls. Each form is an object (instance) and also a window.

vinaya
Download Presentation

VISUAL BASIC 5.0 INTRODUCTION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VISUAL BASIC 5.0 INTRODUCTION Version Date: August 31, 1998

  2. VB General Information • VB is an event-driven (-oriented) language • A “Form” is a container for other forms and controls. Each form is an object (instance) and also a window. • A “Control” is an object that is attached to a form. Controls include: text box, check box, option button, command button, label, etc. • The Toolbox contains objects to be used as necessary to satisfy your requirements.

  3. Form • Control • Toolbox • Properties

  4. Properties, Methods, Events, Statements, and Instructions • A PROPERTY is a named attribute of an object (a noun). • Properties change an object’s appearance or behavior • Syntax: object.property = value • Examples: • cmdUpdateButton.ForeColor = vbBlue • cmdUpdateButton.FontBold = True

  5. Properties, Methods, Events, Statements, and Instructions • A METHOD is a RESERVED KEYWORD that acts on a particular object. Methods are built into the VB language. • Syntax: object.method • Examples: frmSignon.Close frm.Signon.Move .Show .Arrange .Clear etc….

  6. Properties, Methods, Events, Statements, and Instructions • An EVENT is an action recognized by an object • A typical event is a “key press” or “mouse click” • Properties can be “set”, methods can be “specified”, and an event typically requires a set of programmed instructions. • The VB programmer writes coded instructions to respond to events that he/she determines should be assigned to a form or a control.

  7. Properties, Methods, Events, Statements, and Instructions • A STATEMENT is a RESERVED WORD that causes the VB program or the computer’s operating system (Win95/NT) to do something. • Syntax & Example:END and KILL • No reference to an object is required

  8. Properties, Methods, Events, Statements, and Instructions • An INSTRUCTION is a line of VB code in a VB application. • Instructions contain the names of constants, variables, functions, properties, methods, and statements • Example ----->

  9. A Suggested Visual Programming Development Methodology 1. Define the problem to be solved - OO Model 2. Determine file/database structure(s) 3. Determine desired conceptual outputs (screen and hard copy) 4. Determine required inputs 5. Create file/database structure(s) with sample data 6. Design and construct prototype input FORMS • VB - a) create the interface, b) set properties, c) write code 7. Test, test, test; repeat above as necessary 8. Prepare a script for your group’s presentation

  10. VB 5 Development Environment

  11. VB 5 Development Environment • Forms • Controls • Focus • Reference • VB Samples - VB5 and others

  12. VB 5 Development Environment • Visual Basic Project file types: • Project file - projectName.vbp • Form file(s) - formname.frm (frmXxxx.frm) • frmDocument.frm frmMain.frm • Module file(s) - Modulename.bas (Module1.bas) • There may be additional “data” files used by your project (examples: *.bmp, *.ico, *.mdb, etc…)

  13. Be SURE to include YOUR NAME on the FORM!

  14. Form Image • Code • Current Project

More Related