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.

Slides:



Advertisements
Similar presentations
Multiple Forms, Standard Modules, And Menus
Advertisements

Using Macros and Visual Basic for Applications (VBA) with Excel
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
Programming In Visual Basic .NET
Dialog Boxes and Menus. Menus Menu Bar Contains menus which drop down to display list of menu items Each item has a name and text property Each item has.
Chapter 1 Creating a Flyer
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.
 2006 Pearson Education, Inc. All rights reserved Introduction to the Visual C# 2005 Express Edition IDE.
C# Programming: From Problem Analysis to Program Design1 Programming Based on Events C# Programming: From Problem Analysis to Program Design 3 rd Edition.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
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.
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)
Printing and Page Formatting ITSW 1401, Intro to Word Processing Instructor: Glenda H. Easter.
PYP002 Intro.to Computer Science Microsoft Word1 Lab 07 Creating Documents with Efficiency and Consistency.
BİL528 – Bilgisayar Programlama II Advanced Controls, Menus, Toolbars, and Status Bars 1.
®® Microsoft Windows 7 for Power Users Tutorial 2p2 Customizing Microsoft Windows 7.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Visual Basic Chapter 1 Mr. Wangler.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
CTS130 Spreadsheet Lesson 3 Using Editing and Formatting Tools.
POWER POINT CREATING A PRESENTATION. What is a Presentation? A presentation is an informative talk, such as a lecture or speech, that usually includes.
Multiple Forms, Standard Modules, And Menus
5-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
Introduction to MS WORD.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Computing Fundamentals Module Lesson 3 — Changing Settings and Customizing the Desktop Computer Literacy BASICS.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
XP New Perspectives on Microsoft Windows 2000 Professional Windows 2000 Tutorial 1 1 Microsoft Windows 2000 Professional Tutorial 1 – Exploring the Basics.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Revising Presentation Text Lesson 3.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Oct 021 Outline What is a widget? Buttons Combo boxes Text components Message boxes.
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.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
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.
Agency Web Site Navigation Structure. Building the agency web site Agency Web Site Navigation Structure, Slide 2Copyright © 2004, Jim Schwab, University.
MSOffice PowerPoint 1 Part 1 ® Microsoft® Office 2010: Illustrated Introductory.
Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones.
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
1 Right-click anywhere on your screen, and from the menu that will appear, select Options… In the Options window, go to the Selection tab. Under Selection.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
PowerPoint Essentials Vocabulary
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
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.
PowerPoint Essentials Key Terms Lesson 1 1. Key Terms Backstage view: The view that opens when you click the File tab, containing commands for managing.
Menu & Clipboard Menu Cut / Copy / Paste. Menus Created in the Menu Editor Can contain menu titles, menu items, separator bars, submenu titles, and submenu.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Multiple Forms and Menus
Excel Tutorial 8 Developing an Excel Application
Visual Basic.NET Windows Programming
Computer Literacy BASICS
Presentation transcript:

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 Separator BarArrowhead for a submenu Can enable checked/unchecked items Command Shortcut key

110-H2 Menus (Cont) Menu Bar –Drop-down list of commands Have properties Have events to write code for Add MainMenu control to form –Appears in the Component Tray, pane at bottom of Form Designer where non-display controls are shown –Words "Type Here" appear at the top of the form

110-H3 Menu Designer Initially MainMenu Control appears in Component Tray Type first Menu here

110-H4 Using the Menu Designer To create the menus simply type where the words "Type Here" appear at the top of the form Include & symbol as you type to indicate Keyboard Access Keys You are actually entering the Text property for a MenuItem object Change MenuItem object names in the Properties Window to include mnu prefix

110-H5 Submenus Popup to the right of the menu Filled triangle to the right of the menu item indicates to the user the existence of a submenu Avoid more than one level deep Create submenus by moving to the right of a menu item and typing the next item's text

110-H6 SubMenus (cont.)

110-H7 Separator Bars Used for grouping menu items according to their purpose Visually represented as a bar across the menu Create using one of two methods –Typing a single hyphen for the text –Right-click on Menu Designer where you want separator bar and choose Insert Separator

110-H8 Menu Properties Text Name, prefix = mnu –Examples: mnuFileExit, mnuHelpAbout, mnuFormatColorRed Checked, True/False Enabled, True/False Visible, True/False

110-H9 Menu Design Standards Follow the industry standards for Windows for names, order/location, access keys, shortcut keys Basic Main Menus File Edit View Format Help

110-H10 Modifying Menu Items Using Menu Designer Right-Click the Menu Bar on the Form to –Insert New menu –Delete menu –Insert Separator –Edit Name, displays menu item Name property rather than Text property on Form Drag and Drop menu items to new locations

110-H11 Windows Common Dialog Boxes (dlg prefix) Predefined standard dialog boxes for: – File Open and Saving – Printing and Previewing – Color selection – Font selection Add the Common Dialog control to form – Appears in the Component Tray, pane at bottom of Form Designer where non-display controls are shown

110-H12 Color & Font Dialogs

110-H13 Displaying Common Dialog Use ShowDialog Method to display common dialog at run time ShowDialog only displays the dialog, it doesn’t do anything else dlgColor.ShowDialog( ) dlgFont.ShowDialog( ) dlgPrint.ShowDialog( )

110-H14 Using the Common Dialog Information Code must be written to retrieve and use the choices made by the user in the Common dialog Example: – Color Dialog is displayed – User selects color and clicks OK – Code must be written to apply the selected (dlgColor.Color) color to an object(s)

110-H15 Set Initial Values for Color or Font Common Dialogs In Windows, when a Color or Font Common Dialog is displayed it normally displays the current values of the object being updated Before executing the ShowDialog method, you should therefore assign the Object's existing values

110-H16 Set Initial Values (cont.) Examples – Changing the background color of a form Assign the current color to be selected when the Color Dialog displays (otherwise black is selected) – Changing the font of a label Assign the current font name, size, and style to be selected when the Font Dialog displays

110-H17 Color Dialog Example Change background color of a form With dlgColor ' Initialize Color Dialog.Color = frmMain.BackColor ' Display Color Dialog.ShowDialog( ) ' Apply user choice to object frmMain.BackColor =.Color End With

110-H18 Font Dialog Example Change font of a Label With dlgFont ' Initialize Font Dialog.Font = lblEmployee.Font ' Display Font Dialog.ShowFont( ) ' Apply user choices to object lblEmployee.Font =.Font End With

110-H19 Context Menus Popup in response to right mouse click on form or on a control Are specific to the component to which user is pointing when right-clicking Also called Popup menus or Shortcut menus Do not have top level menus like the menu bar

110-H20 Creating Context Menus Add ContextMenu control – Appears in the Component Tray, pane at bottom of Form Designer where non-display controls are shown – Words "Context Menu" appear at the top of the form Click on the words "Context Menu" and the words "Type Here" appear underneath Proceed as you did for Menu Bar

110-H21 Connecting Context Menu to Object Use Context Menu's property window to give it a standard name using the mnu prefix Modify the ContextMenu property of the associated object so that this Context Menu displays when user right-clicks the object If there is only one Context Menu connect it to the form and it will display for the form and all of the controls on the form

110-H22 Determining the Source Control Source Control is the control the user right-clicked to display the Context Menu Code example ' Changes only the color of the object the user clicked mnuContext.SourceControl.ForeColor = dlgColor.Color