Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 

Home ] Up ]


 

Horoscope Program

 

1. Prepare a TOE Chart before beginning to build the interface.
.
2. Create a new application and name the project Birthday.
.
2.1 The name of the form should be frmbirthday.
2.2 Change the Text property to “Sign of the Zodiak”.
2.3 Set the WindowState property to Maximized.
2.4 Assign the filename birthday.vb to the form file object.
2.5 Set the project’s startup form to frmbirthday.
.
3. In the center of the top of the form, create a label named lbltitle and change the text property to Zodiak of Fortune.
.
3.1 Set the TextAlign property of the lbltitle object to MiddleCenter.
3.2 Set the Font property so it is large enough to fill the label box you drew.
3.3 Create two graphics to hold icons on either side of the lbltitle.  Visit Google to get two suitable pictures.
.
4. Create text boxes, with a label above them to hold the month, day and year of the birth date.
.
4.1 The text boxes should be called txtmm, txtdd, and txtyyyy.
4.2 Set the Font property so it is large enough to fill each text box and the corresponding label box you drew. Be sure to change the Text property of the txtmm text box to MM, the txtdd text box to DD, and the txtyyyy text box to YYYY.
4.3 There is no need to name the label.
.
5. Create label boxes to hold the Years, Months, and Days of the age of the person.
.
5.1 Name the label boxes lblyears, lblmonths, and lbldays.
5.2 Set the BorderStyle property to Fixed3D.
5.3 Set the Font property so it is large enough to fill each label box you drew.
5.4 Place labels above these labels to identify them, but you do not have to name them.
.
6. Create labels for the astrological sign and horoscope below the years, months, and days and align them centered.
.
6.1 Call them lblsign, and lblhoroscope.
6.2 Pick an appropriate font and size for the words.
.
7. Create a Fortune button and an Exit button, both at the bottom of the application.
.
7.1 Call them btnexit and btnfortune and set the button’s text to the words “E&xit” and “&Fortune” without the quotes.
7.2 Pick an appropriate font and size for the words Exit and Calculate.
7.3 Double click on the exit button to enter the code window and add the appropriate code to the button object to end the application.
7.4 Add a nested select case statement for values from 1 to 12, and correct days to calculate the correct astrological sign. Assign the astrological sign to the lblsign object and a fortune (you can visit http://astrology.yahoo.com/yastro/.htm for ideas) to the lblhoroscope object.
7.5 You will need to handle the date differences, keeping in mind that April, June, September, and November have 30 days, February has 28, and all the rest have 31. You should also account for leap years.
.
8. Set the Form’s AcceptButton property to the Fortune button.
9. Declare years, months, and days as short variables and declare birthday as a date variable.
10. Double click anywhere on the form object and in the code window set the focus to the first number box by adding the following code in the form load section txtmm.Focus()
11. Save the solution, then start and test the application. Make sure you test each button. Close the application.
.
Example of what your user interface can look like:

All content on this site is free for private use only  |  Contributions are encouraged  |  Thank you to Netfirms for the free hosting  |  If copyright content is published here or links to certain content violates some right/law, contact the Webmaster to have it removed immediately.

 

Site launched: October 2005  |  Updated: July 20, 2006  |  Link exchange  |  Site map  |  Contact us