|Objectives: Gain experience using control
structures, functions, and printing.
Description: This program is intended to provide you with experience using
functions, select-case, if-then-else, loops, Boolean, and modulus.
Develop a program to generate the calendar for a given month and
- The program will obtain the month from the user's
selection out of a
list box (loaded at design
time) and the year from a text box.
- The program will then display a calendar for that month in a
multi-line text box
"txtOut" as shown below.
- For the example below, assume that the user
for the month and "2006" for the year.
All code will be properly commented.
Part of the challenge of this
program is determining the correct algorithm needed to format each line of
the calendar correctly. You may have to change the font to courier make the columns work
I recommend that you build a string to hold your calendar
data, and then output the string to the text box. Why?
To force a line feed in a printed
line, use the VB constant, VbCrLf.
Be sure to use a list box for input of the
month. Make it large enough to display multiple lines, and
remember that the user will have to CLICK one in order to select it.
the current year in the year textbox, create a Form_Load event and include a
txtYear.Text = DateTime.Now.Year
pseudocode or an algorithm for this program.