Starting out with Visual C# (4th Edition)
4th Edition
ISBN: 9780134382609
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
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...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Activity name: activity_main.xmlJava File: MainActivity.javaWrite the code needed to initialize binding variable in OnCreate method in MainActivity.java file.
Using C# language please in Visual Studio 2022 in Windows Form App.
As for the folder-- for convenience sake-- create some folders and insert a couple of names in there, not 200.
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…
Chapter 5 Solutions
Starting out with Visual C# (4th Edition)
Ch. 5.1 - Prob. 5.1CPCh. 5.1 - Prob. 5.2CPCh. 5.1 - Prob. 5.3CPCh. 5.2 - What is a loop iteration?Ch. 5.2 - What is a counter variable?Ch. 5.2 - What is a pretest loop?Ch. 5.2 - Does the while loop rest its condition before or...Ch. 5.2 - What is an infinite loop?Ch. 5.3 - What messages will the following code sample...Ch. 5.3 - How many rimes will the following loop iterate?...
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
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
- 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.arrow_forwardWhat is the purpose of the following OpenFileDialog and SaveFileDialog properties? InitialDirectory Title Filenamearrow_forwardLanguage in C# using Visual Studio in Windows Form app please. For the name files, just create a text file that has a few names for your time sake.arrow_forward
- EXPECTED OUTPUT: Create a Java Swing application that has the following features: . A JFrame with a title My Technical Formative 6 with a JMenuBar having File and Exit as its Menultems • Selecting Exit will Exit the application . Selecting File will open a Modal Dialogbox with a title Technical Formative 6 that mimics tha dialog box below. (String content are switched between textfields and vice versa) • Initial Textfield will contain the string CS0053 upon opening of the dialog box. (Please see behavior below) Text 1: CS0053 Technical Formative 6 Text 1: END Click the switch button output Technical Formative 6 Switch Text 2 Close Text 2 CS0053 Switch Close X Xarrow_forwardJS events? Click code.arrow_forwardIt should be designed as a Desktop Application (with GUI) developed with Java programming language.Note that you are not designing a Web Application or a Mobile Application.Create a project named “FavoriteBooks” which keeps a list of the books that a user has read and liked.This list is stored in a text document (.txt) file and for each book it keeps the following data separated by acomma (,):Book id, Title, Category, First Author Name and Surname, Award Winner, Rating, Year, Number of Pages, andShort Description. Book id: The data type of “Book id” is integer and will be incremented automatically by 1 whenever anew book is added to the list. Title: The data type of “Title” is String. Category: The data type of “Category” is String. It shows the category of a Book such as Arts, Biography,History, Science Fiction, Cookbook, Literature, etc.. First Author Name and Surname: The data type of “Author Name and Surname” is String. Award Winner: The data type of “Award” is String. If the…arrow_forward
- URGENT!!! Code: class Employee: _registry = [] empCount = 0 def __init__(self,name, salary, projects): self._registry.append(self) self.name = name self.salary = salary self.projects = projects Employee.empCount+=1 def displayEmployee (self): print ("Employee name is: ", self.name , " Salary is ", self.salary, "Working on ", len(self.projects)," projects : ", self.projects) print ("") def searchProject (self, key): if key in self.projects: print (self.name ," is working on this project..") def deleteProject (self, key): self.projects.remove(key) print(key, "Project is deleted from an Employee, ", self.name) print (self.name, "is Working on projects : ", self.projects) def addProject (self, key): self.projects.append(key) print(key, "Project is added successfully to an Employee, ", self.name) print (self.name, "is Working on…arrow_forwardTrue or False: Object privileges allow you to add and drop usersarrow_forwardBoat Race Define a class named BoatRace that contains the following information about a Boat Race: race_name: string race_id: int distance: int racers: List of Boat objects Write a constructor that allows the programmer to create an object of type BoatRace with a race_name, race_id, list of racers objects, and distance. The constructor will only take in one parameter, a string representing the name of a CSV file. The file will have the following format: Each row will always have exactly two columns. The first row will always contain the name of the race. The second row will always contain the id number for the race. The third row will always contain the distance for the race. All remaining rows contain information about the boats involved in the race: the first column will be the name of the boat, and the second column is that boat’s top speed. For example, the race in the file below has two boats: The Fire Ball with top speed 12, and The Leaf with top speed 100. Name,The…arrow_forward
- Extra 7-2 Add a stopwatch to the Clock application In this exercise, you’ll add a stopwatch feature to a digital clock application. The stopwatch will display elapsed minutes, seconds, and milliseconds. 1. Open the application in this folder: exercises_extra\ch07\clock_stopwatch\ 2. In the JavaScript file, note the $(), displayCurrentTime(), padSingleDigit(), and DOMContentLoaded event handler functions from the Clock application. In addition, note the global variables and starting code for the tickStopwatch(), startStopwatch(), stopStopwatch(), and resetStopwatch() functions. 3. In the tickStopwatch() function, add code that adds 10 milliseconds to the elapsedMilliseconds variable and then adjusts the elapsedMinutes and elapsedSeconds variables accordingly. Then, add code that displays the result in the appropriate span tags in the page. 4. In the startStopwatch() function, add code that starts the stopwatch. Be sure to cancel the default action of the link too. 5. In the…arrow_forwardC# langauge. In visual studio 2022 for folders, create some folder and type a few names.arrow_forwardCreate a WPF application named FirstNameLastNameM3C Save the application in the Unit3MasteryirstnameLastname folder. Design is up to you. Place everything on either a grid or canvas. Make sure everything is lined up and looks professional. Create an application that allows the user to enter an integer between 1 and 10 into a labeled textbox. There should be a Binary button that uses an if/else construct or switch to get the binary version of the number. There should be another labeled label to display the answer. There should be a clear button that clears the entry and the answer. Hint: You do not need to do any type of calculation for this, just get the binary version of the number and store it in the variable in the decision structure. For example the user enters 4, you display 0100 in the answer label.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning