'
Introduction
This article focus on how to build Dynamic Calendar from scratch in easy steps so we can customize it for any new goal that may be requested in any project.
Background
Some Times telling what day could be task for even smarts one of people, and there is lot of ready tools build to help us with but, may someday someone ask you to build new calendar control from scratch so you I though how we can build one.
Using Code
To build any simple calendar we need to know several things about month we want show its table:
current month number and year number from this two knowns we get number of day's in current month at this year using function Date.DaysInMonth(year, month) after that we generate an instance of date object with passed month and year with day number 1, using another property of Date Object we get current (1 day in month number in first week of that month) currentDate.DayOfWeek() so we can get the offset in weeks array that contain days ordered from (Sun to Sat) so we can know how to represent our day as shown in code below.
Code
Function DrawCalender(ByVal month As Integer, ByVal year As Integer) As String<br />
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here