1 Displaying Dialog Boxes Kashef Mughal. 2 Midterm Stats Here we go  Average was 160.44  Low was 116  High was 184  Mid Quarter Grade - check any.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Tutorial 12: Enhancing Excel with Visual Basic for Applications
Chapter 11: Classes and Objects
Chapter 7: Sub and Function Procedures
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Chapter 9: Sequential Access Files and Printing
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
Chapter 6: Using VB.NET Supplied Classes Visual Basic.NET Programming: From Problem Analysis to Program Design.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Chapter 8: String Manipulation
Saving and Loading Simple Text Files A sequential file stores characters one after the other like songs on a cassette tape. New characters are added to.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
File Handling. Data Files Programs that can only get data from the user interface are limited. –data must be entered each time. –only small amounts of.
Microsoft Visual Basic 2005 CHAPTER 9 Using Arrays and File Handling.
Using Visual Basic 6.0 to Create Web-Based Database Applications
An Introduction to Visual Basic
Using Arrays and File Handling
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter 10: Structures and Sequential Access Files
Chapter Ten Structures and Sequential Access Files Programming with Microsoft Visual Basic th Edition.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Chapter Ten Structures and Sequential Access Files Programming with Microsoft Visual Basic th Edition.
Reference: Lecturer Lecturer Reham O. Al-Abdul Jabba lectures for cap211 Files and Streams- I.
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
Exploring Microsoft Access Chapter 8 Creating More Powerful Applications: Introduction to VBA.
Tutorial 9: Sequential Access Files and Printing1 Tutorial 9 Sequential Access Files and Printing.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
INPUT AND OUTPUT 1. OUTPUT TextBoxes & Labels MsgBox Function/Method MessageBox Class Files (next topic) Printing (later) 2.
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
1.
The Professional Touch Programming Right from the Start with Visual Basic.NET 1/e 10.
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter Eight String Manipulation.
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.
Programming with Microsoft Visual Basic 2008 Fourth Edition Chapter Ten Structures and Sequential Access Files.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
Introduction to Files in VB Chapter 9.1, 9.3. Overview u Data Files  random access  sequential u Working with sequential files  open, read, write,
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Visual Basic.net Functions. Function (Defined) A procedure that returns a value when called.
Tutorial 81 Field, Record, Data File Field - a single item of information about a person, place, or thing Record - a group of related fields that contain.
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
Chapter 6: Using VB.NET Supplied Classes Visual Basic.NET Programming: From Problem Analysis to Program Design.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
2-1 Chapter 2 Using VB.NET to Create a First Solution.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
© 2015, Mike Murach & Associates, Inc.
INPUT AND OUTPUT.
Apply Procedures to Develop Message, Input, and Dialog Boxes
An Introduction to Computers and Visual Basic
3.01 Apply Controls Associated With Visual Studio Form
Files.
3.01 Apply Controls Associated With Visual Studio Form
Using GUI Objects and the Visual Studio IDE
An Introduction to Computers and Visual Basic
Files and Streams Lect3 CT1411.
File Input/Output (I/O)
Multi-form applications and dialogs
CIS16 Application Development Programming with Visual Basic
WEB PROGRAMMING JavaScript.
Part A – Doing Your Own Input Validation with Simple VB Tools
Chapter 3.5 Input and Output
Control Structures Part B - Message and Input Boxes
Tutorial 9 Sequential Access Files and Printing
An Introduction to Computers and Visual Basic
CIS16 Application Development and Programming using Visual Basic.net
Presentation transcript:

1 Displaying Dialog Boxes Kashef Mughal

2 Midterm Stats Here we go  Average was  Low was 116  High was 184  Mid Quarter Grade - check any mistakes  Questions # 38, 67 and 93  Only 40% in still have 60% to go  Any questions

3 Dialog Boxes There are six main types of dialog boxes in VB.NET  MessageBox (most important)  Open  Save  Font  Color  Print

4 MessageBox Dialog  Used to give some type of message to the user  Also is a good tool to debug your code  Uses a bunch of parameters  Syntax is  MessageBox.show (text, caption, buttons, icon, default button)

5 Parameter Details  Text is the only required parameter and it represents the message that will be displayed  caption is the text displayed in the title bar  buttons represents the number of buttons displayed in the dialog box - more on page 315  icon is displayed to enhance the effect of message  default button lets you specify the default button

6 More on MessageBoxes .SHOW is the method used to display the dialog  MessageBox is actually a function that returns a result defined by DialogResult enumeration - more on Page 317  VB6 used Msgbox function which does the same thing. It is acceptable to use either one  Keep the use of message boxes to a minimum  Try the exercises on Pages

7 File Types  Files to which information is written are called output files, because the files store the output produced by an application  Files that are read by the computer are called input files, because an application uses the information in these files as input  Here is a list of different file types:  Sequential access files  Random access files  Binary access files

8 Using Sequential Access Files  A sequential access file is often referred to as a text file, because it is composed of lines of text  Sequential access files are similar to cassette tapes in that each line in the file, like each song on a cassette tape, is both stored and retrieved in consecutive order (sequentially)

9 Procedure for Using a Sequential Access File 1.Declare either a StreamWriter or StreamReader object variable 2.Create a StreamWriter or StreamReader object by opening a file; assign the object’s address to the object variable declared in Step 1 3.Use the StreamWriter object to write one or more lines of text to the file, or use the StreamReader object to read one or more lines of text from the file 4.Use the StreamWriter or StreamReader object to close the file

10 Using StreamWriter and StreamReader Objects In Visual Basic.NET  Use a StreamWriter object to write a sequence of characters—referred to as a stream of characters or, more simply, a stream—to a sequential access file  Use a StreamReader object to read a stream (sequence of characters) from a sequential access file  Before you create the appropriate object, you first must declare an object variable to store the address of the object in the computer’s internal memory

11 Open Dialog  Used to open files  Has a number of methods and properties - more on Pages  The Open Dialog works with the StreamReader object to read data from a file  StreamReader has a few methods as shown on Page 327

12 Save Dialog  Used to save files  Has a number of methods and properties - more on Page 333  The Open Dialog works with the StreamWriter object to write data to a file  Try the following exercises 327 and 335

13 Font and Color Dialogs  Font dialog lets you change surprising the font in an application  It uses the default Window font dialog box to do this  Color dialog lets you change the color of the forms  It also uses the default Window font dialog box to do this

14 Print Dialogs  This dialog lets you print data from a VB application  Definitely good to know this one  Will also employee the Windows default printer dialog box  Using the methods and properties, you can control the behavior of the print dialog  Employs the PrintDocument class

15 More Hands on  Try the following exercises  341  346  350  Next week Chapters 9 and 10