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

These questions are based on 70-526VB: TS: Microsoft .NET Framework 2.0 – Windows-Based Client Development (VB.NET)
Self Test Software Practice Test

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?

  1. Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(1, 3)
  2. Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(3, 1)
  3. Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(0, 3)
  4. Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(3, 0)

A. Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(1, 3)

You should add the following code:

Me.MonthCalendar1.CalendarDimensions = New System.Drawing.Size(1, 3)

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.…



Posted in Uncategorized|


Powered by WebDesk