130 likes | 202 Views
A Tour of Visual Basic. BACS 287. Early History of Basic. B eginners A ll-Purpose S ymbolic I nstruction C ode -- 1963 An “Interpreted” teaching language English-like syntax Originally unstructured Relatively slow execution Easy to learn and use. Modern Basic.
E N D
A Tour of Visual Basic BACS 287
Early History of Basic • Beginners All-Purpose Symbolic Instruction Code -- 1963 • An “Interpreted” teaching language • English-like syntax • Originally unstructured • Relatively slow execution • Easy to learn and use BACS 287
Modern Basic • Several generations (GW-Basic, QuickBasic, QBasic... Visual Basic) • Structured, interpreted language • Compiled executables • Object-Oriented • Based upon GUI forms • Relatively easy to learn • Somewhat slow execution (compared to some other languages) BACS 287
Visual Basic Strengths • Relatively easy to learn • Rapid Application Development (RAD) • Easy maintenance • Can be combined with other tools (C#, Access, SQL Server,...) • Is becoming an industry standard • Can be used to create advanced integrated applications BACS 287
Visual Basic Weaknesses • Has some technical limitations that make it less suitable for professional applications than other languages • Tends to create code that is not as efficient as can be created with other languages BACS 287
Parts of the Screen • Menu Bar • Tool Bar • Tool Box • Solution explorer • Class View window • Form(s) • Properties window • Form designer window BACS 287
Steps in Building a VB Program • Plan what you want to do • Pseudocode • Flowchart • Build the program • Create the Interface • Set the Properties • Write the Code • Test & debug • Distribute & Support BACS 287
Details on “Building the Program” • The interface defines the interaction between the user and the program • The properties determine how the controls (objects) act to events • Code is procedural logic that tells the computer to do things when events happen BACS 287
Details on “Building the Program • Code can be stored: • Associated with control events • “Behind the form” • In stand-alone code modules • For now, think of the code as a way to modify the default functionality of controls BACS 287
Form Design Basics • Simple is better • Do not overuse graphics • Avoid overuse of 3D effects • Use logical icons where appropriate • Be contestant • Buttons (size, color, text, function,…) • Layout • Color scheme • Prompts, ... BACS 287
Form Design Basics • Layout data logically • Top-to-bottom • Left-to-right • Group logically related items • Use blank space effectively • Layout controls logically • Put like controls together • Segregate “dangerous” controls • Use frame containers for visual connection BACS 287
Form Design Basics • Use the proper control for the task • Option buttons for mutually exclusive • Check buttons when several possible • Read-only list box when selection limited,... • Use form space wisely • Drop-down combo boxes • Drop-down list boxes • Scrolling grid boxes • Tab control for multi-forms, ... BACS 287
Form Design Basics • Use color wisely • Gray and pastel colors for backgrounds • Use bright colors sparingly • Do not use color where it is not needed • Make form flow logical • Available options should be logical • Complex menu selections should be avoided BACS 287