Starting Out With Visual C# (5th Edition)
Starting Out With Visual C# (5th Edition)
5th Edition
ISBN: 9780135183519
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 5.7, Problem 5.34CP

Explanation of Solution

OpenFileDialog control:

  • • The “OpenFileDialog” control displays a standard Windows “Open” dialog box.
  • • The “Open” dialog box allows user to open the existing file because it helps to browse system and select the desired file.
  • • To add an “OpenFileDialog” control to a form, the “OpenFileDialog” tool is been double-clicked under the “Dialogs” group in “Toolbox” window.
  • • The control appears in component tray at bottom of “Designer”.
  • • The default name given to control is “openFileDialog1”.
  • • Some of the properties are listed below:
    • ○ InitialDirectory
    • ○ Title
    • ○ Filename
  • InitialDirectory:
    • ○ The open dialog box displays the contents of user’s document directory or folder.
    • ○ The path could be stored in “InitialDirectory” property to specify another directory to be initially displayed.
    • ○ The syntax for specification is shown below:

  openFile.InitialDirectory = "D: \\Info";

  • Title:
    • ○ The word “Open” is displayed in OpenFileDialog box title bar.
    • ○ To change the title, default text displayed in title bar.

  openFile.InitialDirectory = "D: \\Info";

openFile.Title = "My Title";

  • Filename:
    • ○ When user chooses a file with OpenFileDialog box, the file’s path and file name are stored in control’s Filename property.

SaveFileDialog control:

  • • The “SaveFileDialog” control displays a standard Windows “Save As” dialog box...

Blurred answer
Students have asked these similar questions
React Create hover calendar   I have a calendar icon in react and I want to display a calendar when hovering over the calendar icon in react: here is code: <div className="date-choose pad-left-0 pad-right-0"> <span className="enhanced-sports enhanced-sports-calendar" /> </div>
Please kindly attach output SS A social networking website hires you to meet the following requirements: User can create their profile User can check for mutual friends User can add new friends User can delete friends Display user’s profile Solution Guidelines: Create a class Profile having name, emailId, city , country, friendlist[] ( Keep the fields private) Profile class will contain following methods: createProfile(String name , String emailId, String city,  String country): allow user to set his information addFriends(Profile profile): sends request, if a person     accepts the  request add the person object into friendlist[] Note: Achieve Method Overloading keep the parameters as (Profile profile , String Message) giving Access to user to send request with a personalized message. removeFriend(Profile profile):can remove a friend from  the friendlist showFriends(): display the friendlist              search(Profile profile):searches for profile in the list if it…
React Create hover calendar   I have a calendar icon in react and I want to display a calendar when hovering over the calendar icon in react: here is code: <div className="date-choose pad-left-0 pad-right-0"> <span className="enhanced-sports enhanced-sports-calendar" /> </div>  Please give proper explanation and typed answer only.

Chapter 5 Solutions

Starting Out With Visual C# (5th Edition)

Ch. 5.4 - Name the three expressions that appear inside the...Ch. 5.4 - You want to write a for loop that displays I love...Ch. 5.4 - What would the following code display? for (int...Ch. 5.4 - What would the following code display? for (int...Ch. 5.5 - What is a posttest loop?Ch. 5.5 - What is the difference between the while loop and...Ch. 5.5 - How many times will the following loop iterate?...Ch. 5.6 - What is an output file?Ch. 5.6 - What is an input file?Ch. 5.6 - What three steps must be taken by a program when...Ch. 5.6 - What is the difference between a text file and a...Ch. 5.6 - Prob. 5.22CPCh. 5.6 - What type of object do you create if you want to...Ch. 5.6 - What type of object do you create if you want to...Ch. 5.6 - If you call the File.CreateText method and the...Ch. 5.6 - If you call the File.AppendText method and the...Ch. 5.6 - What is the difference between the WriteLine and...Ch. 5.6 - What method do you call to open a text file to...Ch. 5.6 - What is a files read position? Initially, where is...Ch. 5.6 - How do you read a line of text from a text file?Ch. 5.6 - How do you close a file?Ch. 5.6 - Assume inputFile references a StreamReader object...Ch. 5.7 - What is the benefit of using an Open and/or Save...Ch. 5.7 - Prob. 5.34CPCh. 5.8 - What does a Random objects Next method return?Ch. 5.8 - What does a Random objects NextDouble method...Ch. 5.8 - Write code that creates a Random object and then...Ch. 5.8 - Write code that creates a Random object and then...Ch. 5.8 - Prob. 5.39CPCh. 5.8 - What happens if the same seed value is used each...Ch. 5.9 - Prob. 5.41CPCh. 5.9 - Prob. 5.42CPCh. 5 - ListBox controls have an __________ method that...Ch. 5 - A __________ is commonly used to control the...Ch. 5 - A(n) __________ loop tests its condition before...Ch. 5 - The term __________ is used to describe a file...Ch. 5 - The term __________ file is used to describe a...Ch. 5 - A __________ file contains data that has been...Ch. 5 - When you work with a __________ file you access...Ch. 5 - Prob. 8MCCh. 5 - A __________ object is an object that is...Ch. 5 - When a program works with an input file, a special...Ch. 5 - When the user selects a file with the Open dialog...Ch. 5 - The __________ control displays a standard Windows...Ch. 5 - Once you have created a Random object, you can...Ch. 5 - Prob. 14MCCh. 5 - When you run an application, the applications form...Ch. 5 - If the ListBox is empty, the Items.Count property...Ch. 5 - To increment a variable means to increase its...Ch. 5 - When a variable is declared in the initialization...Ch. 5 - The while loop always performs at least one...Ch. 5 - The term read file is used to describe a file that...Ch. 5 - To append data to an existing file, you open it...Ch. 5 - As items are read from the file, the read position...Ch. 5 - The numbers that are generated by the Random class...Ch. 5 - Prob. 10TFCh. 5 - What is contained in the body of a loop?Ch. 5 - Write a programming statement that uses postfix...Ch. 5 - How many iterations will occur if the test...Ch. 5 - What are filename extensions? What do they...Ch. 5 - When an input file is opened, what is its read...Ch. 5 - How can you read all of the items in a file...Ch. 5 - What is a variable that is used to accumulate a...Ch. 5 - By default, the Open dialog box displays the...Ch. 5 - Prob. 9SACh. 5 - Prob. 10SACh. 5 - Write a loop that displays your name 10 times.Ch. 5 - Write a loop that displays all the odd numbers...Ch. 5 - Write a loop that displays every fifth number from...Ch. 5 - Write a code sample that uses a loop to write the...Ch. 5 - Assume that a file named People.txt contains a...Ch. 5 - Distance Calculator If you know a vehicles speed...Ch. 5 - Distance File Modify the Distance Calculator...Ch. 5 - Celsius to Fahrenheit Table Assuming that C is a...Ch. 5 - Prob. 4PPCh. 5 - Pennies for Pay Susan is hired for a job, and her...Ch. 5 - Prob. 6PPCh. 5 - Prob. 7PPCh. 5 - Prob. 8PPCh. 5 - Prob. 9PPCh. 5 - Addition Tutor Create an application that...Ch. 5 - Random Number Guessing Game Create an application...Ch. 5 - Calculating the Factorial of a Number In...Ch. 5 - Random Number File Writer Create an application...Ch. 5 - Random Number File Reader This exercise assumes...
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning