The Internet contains a vast amount of code snippets that you can use in your Visual Basic

Question:

The Internet contains a vast amount of code snippets that you can use in your Visual Basic applications. And in many cases, you can use the snippet without fully understanding each line of its code. In this exercise, you will use a code snippet that rounds the corners on a splash screen.

a. Open the Rounded Corners Solution (Rounded Corners Solution.sln) file contained in the VB2015\Chap01\Rounded Corners Solution folder. If necessary, open the designer window. The image that appears on the form is displayed by the form’s BackgroundImage property. The form’s BackgroundImageLayout property is set to Stretch.

b. For the code snippet to work properly, the splash screen cannot have a border. Therefore, change the form’s FormBorderStyle property to None.

c. Save the application and then start the solution. Notice that the splash screen contains the standard corners, which are not rounded. Click the Exit button to end the application.

d. Open the Code Editor window. Select (highlight) the lines of code contained in the form’s Load event procedure, which is processed when the application is run and the form is loaded into the computer’s internal memory. See Figure 1-36.

Start Uncomment the selected lines button Main Form.vb x Main Form v [Design] O Rounded Cormers Project End Sub frmMain a, InitialiteCormponent

e. Click the Uncomment the selected lines button on the Standard toolbar. (Refer to Figure 1-36 for the button’s location.) Save the solution and then start the application. The splash screen now has rounded corners. See Figure 1-37.

f. Click the Exit button to end the application. Close the Code Editor window and then close the solution.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: