Create a Windows Forms application. Use the following names for the project and solution, respectively: Vacation Project
Question:
Create a Windows Forms application. Use the following names for the project and solution, respectively: Vacation Project and Vacation Solution. Save the application in the VB2017\Chap09 folder.
a. The application will use two sequential access files named NeedToVisit.txt and Visited.txt. Copy the files from the VB2017\Chap09 folder to the Vacation Project’s bin\Debug folder and then open both files. The NeedToVisit.txt file contains the names of five destinations that the user wants to visit. The Visited.txt file contains the names of three destinations that the user already visited. Close both .txt windows.
b. Create the interface shown in Figure 9-39. The File menu should have an Exit option.
c. Change the lstNeed control’s Sorted property to True. Change the lstVisited control’s SelectionMode and Sorted properties to None and True, respectively.
d. The frmMain_Load procedure should use the NeedToVisit.txt and Visited.txt files to fill the lstNeed and lstVisited controls, respectively. It should also select the first item in the lstNeed control. Code the procedure.
e. The Move to visited button should move the selected item from the lstNeed control to the lstVisited control. Code the appropriate procedure.
f. If at least one change was made to the list boxes, the frmMain_FormClosing procedure should use a message box to ask the user whether he or she wants to save the change(s). If the user clicks the Yes button, the procedure should save the items in both list boxes to the appropriate files before the form closes.
g. Save the solution and then start and test the application.
Step by Step Answer: