The Day Discoverer program displays the day for any date that is entered.
This program uses the following ActiveX controls:
This project contains one Form, Daydisc:
This form contains four Label controls - Dt, Month, Year and Label1. The Label Label1, has its Font set to Times New Roman (size 24) and is used to display the date.
For the Date and Month, there are two ComboBoxes - Text1 and Text2. Both have their Style property set to 2 - Dropdown List. The Text1 ComboBox has 01 - 31 entered into the List property and Text2 has 01 - 12 in its List property. There is one TextBox for the year - Text3. On the right of Text3, is an UpDown control called YearUD.
Daydisc contains the following code:
When the program loads, the date is set to today's date, which subsequently shows today's day name. Changing Text1, Text2 and Text3 activates the getday subroutine, which displays the day name for the date displayed. In Text3_KeyDown, pressing the up or down arrow keys adds or subtracts 1 year from the year displayed. This is also achieved with the YearUD_UpClick and YearUD_downClick events.
blog comments powered by Disqus
Martin Allen 1999 - 2011. Last updated Saturday 13 August 2011 12:13:44 AM +0100.