CIS 3260 Intro to Programming with C#

Similar documents
Keeping Track, Menus. CSC 330 Object-Oriented Programming 1

CIS 3260 Intro to Programming in C#

CIS 3260 Intro. to Programming with C#

Programming. C# Programming: From Problem Analysis to Program Design 2nd Edition. David McDonald, Ph.D. Director of Emerging Technologies

Menus, Common Dialog Controls, Context Menus, Sub Procedures, and Functions

Chapter 6. Multiform Projects The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Copyright 2014 Pearson Education, Inc. Chapter 7. Multiple Forms, Modules, and Menus. Copyright 2014 Pearson Education, Inc.

CIS Intro to Programming in C#

1 Introduction. ThinPrint Client Installation Page 1

Module 8: Building a Windows Forms User Interface

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

CIS 3260 Intro. to Programming with C#

Location of menu elements

Lesson 09 Working with. SDI and MDI. MIT Rapid Application Development By. S. Sabraz Nawaz Lecturer in MIT

Chapter 6 Dialogs. Creating a Dialog Style Form

Using the Customize Dialog Box

Lesson 09 Working with. SDI and MDI. MIT 31043: Rapid Application Development By: S. Sabraz Nawaz Senior Lecturer in MIT Dept. of MIT, FMC, SEUSL

R. Reports Menu: 8. Batch Detail Report

Using the Web in Mathematics Foundations Course An Introduction to Microsoft PowerPoint Sarah L. Mabrouk, Framingham State College

JDirectoryChooser Documentation

Lesson 4 - Creating a Text Document Using WordPad

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

Import Content. Learning Objectives. In this Job Aid, you will learn how to import content through the browser by adding:

Microsoft Word 2016 by Prapaporn Techa-angkoon adapted into English by Dr. Prakarn Unachak

The user-defined grids can only be defined and managed from within the Grid Manager dialog.

Correcting Grammar as You Type. 1. Right-click the text marked with the blue, wavy underline. 2. Click the desired option on the shortcut menu.

Open Book Format.docx. Headers and Footers. Microsoft Word Part 3 Office 2016

PowerPoint Basics (Office 2000 PC Version)

User Manual pdoc Pro App Server

Copyright 2018 MakeUseOf. All Rights Reserved.

XnView Image Viewer. a ZOOMERS guide

Image Loader Program (ILP) for High Performance Controllers. Book E33 - version 1.03

Customizing DAZ Studio

Instructions for Crossword Assignment CS130

for G.C.E. Ordinary Level Examination

CST272 Getting Started Page 1

Dive Into Visual C# 2008 Express

Preferences/Tools. Overview. Favorites Adding a Favorite Using Favorites Edit Favorites

Program and Graphical User Interface Design

XnView 1.9. a ZOOMERS guide. Introduction...2 Browser Mode... 5 Image View Mode...15 Printing Image Editing...28 Configuration...

2 The Stata user interface

PROMIS Support FAQ. Topics:

HP Color LaserJet CM2320 MFP Series Print tasks

Introduction to CS Dealing with tables in Word Jacek Wiślicki, Laurent Babout,

Introduction... 3 MARC 21 features... 4

POS Designer Utility

1 A simplified view onto the documents and data stored on Business Collaborator

Assignment #4: Creating New Layouts & Slides

Dr. Cliff Jolliffe. My first ACS.NET Application. Microsoft C#

The Fundamentals. Document Basics

TuneTown Lab Instructions

Office Button.

2. Click the From Beginning command in the Start Slide Show group to start the slide show with the first slide.

Tips and Tricks for Microsoft Word 2010

ITEC102 INFORMATION TECHNOLOGIES

Full file at Chapter 2: Creating a User Interface

Menus and Printing. Menus. A focal point of most Windows applications

Correcting Grammar as You Type

Create an imovie Using the MacBookʼs Built-in isight Camera. Presented by Larry Gooch TETC ʼ09

Quick Reference Guide 8 Excel 2013 for Windows Keyboard Shortcut Keys

Microsoft Excel > Shortcut Keys > Shortcuts

Optional Lab: Customize Settings in Windows Vista

AutoCAD 2009 User InterfaceChapter1:

Enterprise Architect. User Guide Series. Model Wizard

In this exercise you will gain hands-on experience using STK X to embed STK functionality in a container application created with C#.

HP Color LaserJet CP2020 Series Printer Print tasks

Visual Studio.NET. Rex Jaeschke

Private/Public Saved Searches

Avoiding Common PowerPoint Issues. David DK Kornegay

Start menu. Toggles between All Programs & Back

Goal Management with Microsoft Outlook. Workbook

CIS 3260 Intro to Programming in C#

Darshan Institute of Engineering & Technology for Diploma Studies

FUN TECH TIPS 101 SUMMER CLOVIS UNIFIED SCHOOL DISTRICT INFORMATION TECHNOLOGY SERVICES Prepared by Tanie McKinzie, TSS III

PS Printer Driver. for Windows 2000/XP. User s Manual

Customizing FrontPage

Lab - Configure Browser Settings in Windows 8

Introduction to SPSS

SMART Recorder. Record. Pause. Stop

Was this document helpful? smarttech.com/docfeedback/ SMART Ink 5.2 USER S GUIDE

Appendix J: Using Shortcut Keys and Shortcut Menus

Printing. In This Chapter

Introduction to Microsoft Word

WELCOME TO GOOGLE DRIVE!

ADVANCED GroupWise 7.0

Week 1 Word The Word 2010 Window

Quick Guide to the NoMachine GUI

Excel Introduction to Excel Databases & Data Tables

How to use i3annotate?

Opening Screen When you first enter Slick!, a blank opening screen will appear as shown below.

Software Engineering Software Requirements Specification (SRS) Document

Unit 4 Advanced Features of VB.Net

Refer to the ACTIVcontroller help and ACTIVslate documentation for more information about using the Controller Program and the ACTIVslate.

Programming with Microsoft Visual Basic.NET. Array. What have we learnt in last lesson? What is Array?

Excel The primary replacement for menus and toolbars in Office Excel 2007 is the Ribbon. Designed for easy browsing, the

How to make a power point presentation. Dr. Mohamed F. Foda

Office 2016 Excel Basics 06 Video/Class Project #18 Excel Basics 6: Customize Quick Access Toolbar (QAT) and Show New Ribbon Tabs

4D Write. User Reference Mac OS and Windows Versions. 4D Write D SA/4D, Inc. All Rights reserved.

Ink2Go Help. Toolbar functions

How to Speed Up Microsoft Word 2007 and 2010

Transcription:

Menus and Common Dialog Boxes McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Create menus and submenus for program control Display and use the Windows common dialog boxes McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-2 Menu Bar Menus that drop down to display a list of menu items Menu items are controls with properties and events Each menu item has a Name and Text property and a Click event (similar to a button) Easy to create menus for a Windows form using Visual Studio's Menu Designer Menus look and behave like standard Windows menus McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-3 Dr. David McDonald Chapter 5 Page 1

Group menu items according to their purpose Draws a bar across the entire menu To create a separator bar, add a new menu item and click on its drop-down arrow Select Separator or type a single hyphen in the Menu Designer McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-4 Menu items have Enabled property set to true by default Enabled menu items appear in black text and can be selected Disabled items are not available Enabled property can be set at design time or run time, in code instructionstoolstripmenuitem.enabled = false; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-5 Menu items have Checked property set to false by default A check mark next to a menu item indicates the option is selected Checked property can be set at design time or in code summarytoolstripmenuitem.checked = true; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-6 Dr. David McDonald Chapter 5 Page 2

Set a menu item s initial Checked property in the Properties window To change the menu item s state in code, set its Checked property to true or false if (summarytoolstripmenuitem.checked) { // Uncheck the summary menu item. summarytoolstripmenuitem.checked = false; } else { //Check the summary menu item. summarytoolstripmenuitem.checked = true; } McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-7 Many users prefer to use keyboard shortcuts for selecting menu items To set keyboard shortcuts Select the menu item in the designer In the Properties window, select the ShortcutKeys property Make a choice from the drop-down list Set ShowShortcutKeys property to false to prevent a shortcut from showing on the menu McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-8 Predefined standard dialog boxes Specifying colors and fonts Opening, saving and browsing for files Place the desired common dialog component from the Dialogs tab of the toolbox in the Component Tray Default names for the components are fine McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-9 Dr. David McDonald Chapter 5 Page 3

Display the dialog box at run time using the ShowDialog method The dialogobject is the name of the common dialog component Write code to show the dialog in the event handler for a menu item or button McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-10 A dialog box is said to be modal The box stays on top of the application and must be responded to Use the ShowDialog method to display a dialog box, which is a window displayed modally A window that does not require response is said to be modeless Use the Show method to display a modeless window McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-11 Color selected in the Color dialog box is stored in the Color property Color property can be assigned to another object, such as a control Display dialog box with ShowDialog method User responds to dialog box Use the Color property McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-12 Dr. David McDonald Chapter 5 Page 4

Color selected in the Color dialog box is stored in the Color property Color property can be assigned to another object, such as a control Display dialog box with ShowDialog method User responds to dialog box Use the Color property McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-13 The Font common dialog box displays available fonts for the system display After the user makes a selection, the Font property can be assigned to other objects on the form titlelabel.font = fontdialog1.font; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-14 Before executing the ShowDialog method, assign the existing values of the object's properties When the dialog box appears, the current values will be selected If the user presses Cancel, property setting for the objects will remain unchanged colordialog1.color = titlelabel.forecolor; fontdialog1.font = titlelabel.font; titlelabel.font = fontdialog1.font; McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. 5-15 Dr. David McDonald Chapter 5 Page 5