Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.

Slides:



Advertisements
Similar presentations
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Excel Project 7 Using Macros and Visual Basic for Applications (VBA) with Excel.
Advertisements

Using Macros and Visual Basic for Applications (VBA) with Excel
With Microsoft Excel 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Excel 2010.
110-H1 More VB Tools Creating a Menu: What is a menu? a group of (related) commands displayed at at the top of an application Top level menu Disabled command.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Chapter 5 - Menus, Sub Procedures, and Sub Functions  Menus - controls - properties and events –menu editor - create and change –defining menus - menu.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
MENUS AND THE MENU EDITOR Elements of a Menu Menu bar Menu title Separator bar Menu items.
Using the Visual Basic Editor Visual Basic for Applications 1.
Copyright © 2001 by Wiley. All rights reserved. Chapter 8: Security, Menus, and Files Security Menu Systems Creating a Memo Editor Using the Clipboard.
Creating Menu. Objectives Create a menu system for a form –Create a menu –Create a menu titles –Create a menu items –Create a submenu –Modify menu –Edit.
Copyright © 2014 Pearson Education, Inc. Chapter 7 Multiple Forms, Modules, and Menus.
Introduction to Visual Basic. What is Visual Basic? An environment for developing Windows applications Components –A GUI (Graphical User Interface - gooey)
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Chapter 8: String Manipulation
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Multiple Forms, Standard Modules, And Menus
5-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Program Design and Coding
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
OCC Network Drives  H:\  P:\ 
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Lesson 2 Manipulating.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lesson 1 Introduction.
Microsoft Office XP Illustrated Introductory, Enhanced Started with Windows 2000 Getting.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® PowerPoint 2010 © 2011 The McGraw-Hill Companies,
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Lesson: 2 Common Features and Commands After completing this lesson, you will be able to: Identify the main components of the user interface. Identify.
Slide 1 Using Menu Bar & Common Dialog Boxes. Slide 2 Setting Up the Main Items v First open the form on which you want the menu located v Then start.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
Chapter 5 Menus, Sub Procedures and Sub Functions Programming In Visual Basic.NET.
BBT 10 Visual Basic 03 Enrichment. Tip Before creating any files for your project, first create a new folder Save all of your files in the folder Pieces.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Word processing is the software package that enables you to create,edit, print and save documents for future retrieval reference. creating a document.
Multiple Forms and Menus
Chapter 7 Advanced Form Techniques
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San Diego

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Ch5. Menus, Sub Procedures & Sub Functions  Menus and submenus  Windows common dialog boxes  Function procedures  Sub procedures  Creating Executable Files

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Menus  Caption: Holds menu "words"  Follow naming conventions: –mnu + –mnu + + –E.g., mnuFileExit, mnuEditClear or mnuFile  Submenu: menu within a menu

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Defining Menus  Define menus: Tools, Menu Editor –Caption –Name (mnuMenuxxCommand)  Sub menus defined by indenting command  Menu and submenu captions use & before keyboard access key

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Creating a Menu  Create a menu structure like this one: FileHelp Exit About 1.Type caption 2.Type name 3.Indent if necessary 4.Repeat as needed

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Coding for Menu Commands  Build commands first  Then, double click each command to bring up its Click event procedure  You can modify menu order or command order by invoking Menu Editor again  Checked property: contains check—toggles on and off  Enabled property: command available or not based on the Enabled property

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Standards for Windows Menus  Follow existing Windows standards File menu is leftmost menu in menu bar Help menu is rightmost menu in menu bar Use keyboard access keys; match them to existing ones Use keyboard shortcuts (Ctrl + P for print)

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Common Dialog Boxes  You can use existing Windows dialog boxes by inserting the common dialog control on your form  Common dialog box does: –Open, Font, Color, Save As, and Print  If it is not in your toolbox, then execute: –Project, Components, check the Microsoft Common Dialog Control 5.0

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Common Dialog Boxes (cont'd)  Only need on Common dialog box/form  Code determines which of the possible dialog boxes is displayed  Use prefix “dlg” for name of control  Display dialog box: dlgCommon.ShowColor dlgCommon.ShowFont

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill General Procedures  General procedures respond when specifically called by other procedures  They are not event driven  They are used to “package” a commonly used series of instructions  Invoke general procedures by calling them  Select Tools, Add Procedure to insert one

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Functions vs. Sub Procedures  Functions vary from sub procedures in one way: they return a value  One calls a general procedure by simply writing its name along with any arguments  Somewhere in the procedure, you must set the function’s name equal to the value to be returned

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Hands-on Programming Example

Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Creating Executable Files  You can convert your applications to executable (.EXE)  Execute File, Make...  You can select a special icon for your application, insert the company name, etc. via the Options button on the Make EXE File dialog box