Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones.

Slides:



Advertisements
Similar presentations
Using Macros and Visual Basic for Applications (VBA) with Excel
Advertisements

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.
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.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Chapter 5 Menus, Common Dialog Boxes, Sub Procedures, and Function Procedures Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.
C# Programming: From Problem Analysis to Program Design1 Programming Based on Events C# Programming: From Problem Analysis to Program Design 3 rd Edition.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 2 Tariq Aziz and Kevin Jones.
Using Multiple Forms. Creating a New Form ProjectAdd Windows Form.
MENUS AND THE MENU EDITOR Elements of a Menu Menu bar Menu title Separator bar Menu items.
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
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.
Compunet Corporation Programming with Visual Basic.NET GUI Chapter 3 Week 13 Tariq Aziz and Kevin Jones.
BİL528 – Bilgisayar Programlama II Advanced Controls, Menus, Toolbars, and Status Bars 1.
Customizing Your Toolbars in Microsoft Office Lunch and Learn: June 7, 2005.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Chapter 8: String Manipulation
Visual Basic Chapter 1 Mr. Wangler.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
1 CA201 Word Application Increasing Efficiency Week # 13 By Tariq Ibn Aziz Dammam Community college.
Multiple Forms, Standard Modules, And Menus
5-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
IE 411/511: Visual Programming for Industrial Applications
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
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.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
Lập trình trên Windows với Microsoft®.NET Giảng viên : Hồ Hoàn Kiếm.
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.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
1 Working with Menus and Dialog Boxes. 2 Objectives You will be able to Create and edit menus for Windows Forms applications. Write code to handle menu.
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
Debugging and Menus Part07dbg --- Solving the problem, Debugging in Break time, Menus, Common Dialogs, and User-written methods.
Productivity Programs Common Features and Commands.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
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.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
The Professional Touch Programming Right from the Start with Visual Basic.NET 1/e 10.
Computing Fundamentals Module Lesson 7 — The Windows Operating System Computer Literacy BASICS.
Menus Menus provide groups of related commands for windows applications Menu, menu items, submenus A menu item that contains a submenu is considered to.
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.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
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.
Michael Olivero Microsoft Student Ambassador for FIU Pick up your free drink below to your left. 1 per person please.
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.
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
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.
Menu & Clipboard Menu Cut / Copy / Paste. Menus Created in the Menu Editor Can contain menu titles, menu items, separator bars, submenu titles, and submenu.
Visual Basic.NET Windows Programming
How to design a Windows Forms application
Using Multiple Forms.
Simple Windows Applications
Lecture 5 Menu Strip Demo with Dialog Controls.
Presentation transcript:

Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones

Compunet Corporation Overview Add menus to your program Process menu choices using program code Use the OpenFileDialog and ColorDialog controls to display special purpose dialog boxes

Compunet Corporation Creating Menus During Design Main menus are created during the design stage with the MainMenu component The MainMenu component allows you to do the following: –Create new menus and menu bars –Add new menu items to existing menus –Modify the properties of menus and menu items via the Properties window –Create event handlers to handle the Click event and other events for menu items

Compunet Corporation Creating Menus During Design

Compunet Corporation To create main menus at design time In the Toolbox, add a MainMenu component to the form by double- clicking the MainMenu tool Type the text for the first menu item, add additional menu items until the structure of your menu is complete.

Compunet Corporation To create main menus at design time In the Properties window, set any menu-item properties that you want to change

Compunet Corporation To create main menus at design time In the Properties window of the form, make sure that the Menu property is set to the menu you want to display

Compunet Corporation Separating Menu Items To create a separator bar on your menu –Select the menu item that represents where you want to place a separator. –Type a hyphen (-). At run time, this hyphen will be displayed as a separator bar.

Compunet Corporation Assign an access key To assign an access key to a menu item: –In the designer, click the menu item to which you want to assign an access key. –Type an ampersand (&) in front of the desired letter for the access key.

Compunet Corporation Using Menu Item Events You can create event handlers for menu items in the same way that you create event handlers for other controls The most frequently used event is the Click event. The Click event handler should contain the code to be executed when the menu item is clicked. This code will also execute when a shortcut key combination is pressed.

Compunet Corporation Using Menu Item Events The Select event is raised when a menu item is highlighted, either with the mouse or with access keys. You might create an event handler that provides detailed help regarding use of a menu command when selected.

Compunet Corporation Using Menu Item Events The Popup event is raised just before a menu item’s list is displayed. You can use this event to enable and disable menu items at run time. MenuItem1.Enabled = False

Compunet Corporation Displaying Check Marks on Menu Items You can use the Checked property to display a check mark next to a menu item. ' Checks the menu item MenuItem1.Checked = True ' Unchecks the menu item MenuItem1.Checked = False

Compunet Corporation To assign a shortcut key Select the menu item for which you want to enable a shortcut key. In the Properties window, select the Shortcut property. Choose the appropriate shortcut key combination from the drop-down menu.

Compunet Corporation Dialog Boxes Controls OpenFileDialog SaveFileDialog FontDialog ColorDialog PrintDialog PrintViewDialog PageSetupDialog

Compunet Corporation OpenFileDialog Control Click and drag OpenFileDialog controls to the form. You can find them on component tray