If necessary, complete Exercise 3. Use Windows to rename the Jacket Solution folder to Jackets Solution-Modified. Open
Question:
If necessary, complete Exercise 3. Use Windows to rename the Jacket Solution folder to Jackets Solution-Modified. Open the Jackets Solution.sln file contained in the VB2017\ Chap01\Jackets Solution-Modified folder. If necessary, open the designer window.
a. Unlock the controls and then modify the interface, as shown in Figure 1-41.
b. Change the name of the picture box that displays the jacket to picJacket. Name the four new buttons btnBlack, btnBlue, btnBrown, and btnRed.
c. Each of the four color buttons will display an image of an appropriately colored jacket in the picJacket control. The different colored images are stored in the BlackJacket.png, BlueJacket.png, BrownJacket.png, and RedJacket.png files, which are contained in the VB2017\Chap01 folder. In Exercise 3, you added the BlackJacket.png file to the project; now you need to add the other three files. Use the task box on the picJacket control to add the BlueJacket.png, BrownJacket.png, and RedJacket.png files to the project, and then close the Select Resource dialog box. (Do not be concerned that the jacket in the picJacket control is no longer the black one.) If necessary, expand the Resources node in the Solution Explorer window. Notice that the folder contains five .png files.
d. Lock the controls on the form. When the user clicks the Black button, the black jacket should appear in the picJacket control. Open the Code Editor window and then open the code template for the btnBlack_Click procedure. Enter the comment and assignment statement shown in Figure 1-41. The My in the statement refers to the current application, Resources refers to the Resources folder, and BlackJacket refers to the BlackJacket.png file within the Resources folder. The dot member access operator indicates that BlackJacket is a member of the Resources folder, which is a member of the current application.
e. Code the btnBlue_Click, btnBrown_Click, and btnRed_Click procedures. Save the solution and then start and test the application.
Step by Step Answer: