Create a UI for a Windows Forms Application by Using Standard Controls

Objective: Create a UI for a Windows Forms application by using standard controls.Sub-objective: Add and configure a Windows Forms control.

Single answer, multiple-choice

You are an application developer in a company. You create Windows-based applications using Visual Basic .NET. You need to create a user interface to be used by the planning and organization department of your company. On a Windows form, you need to display the calendars of three consecutive months starting from the current month. The calendars should be placed in a vertical direction one under the other in sequence. You have placed a MonthCalendar on the Windows form named MonthCalendar1.

Which code you should add in the Windows form of the application to display three such calendars?

This code uses the CalendarDimensions property of the MonthCalendar control. This property specifies a Size representing the number of columns and rows of months to be displayed for the MonthCalendar control on the Windows form. You can display the maximum of 12 months together at the same time, and all the monthly calendars to be displayed should belong to the same year. When specifying the Size value, the first integer represents the number of columns to use when displaying the calendars, and the second integer represents the number of rows to use when displaying the calendars. With this code, there will be one column of three consecutive monthly calendars displayed on the form in a vertical direction.

You should not use the code that specifies a Size of (3, 1). Using this code there will be three columns and one row, and the calendars will display horizontally instead of vertically.

You should not use the code that specifies a Size of (0, 3) because the value 0 for the columns is not a valid value. This code will generate a run-time error in the application.

You should not use the code that specifies a Size of (3, 0) because the value 0 for the rows is not a valid value. This code will generate a run-time error in the application.