![]() |
Creating a Zodiac Sign Program in Visual Basic
Hello all, I am trying to build a Zodiac Sign in Visual Basic and can't seem to get it to change names after selecting a different date and Month.... I have used, dim Dat as integer, Mon as string
but not sure if I have to dim 1,2,3, etc. as integer, dim January, February, as string, etc., but cannot seem to figure out how to get lets say Aries to change to Taurus... march 21 to April 19 are Aries, so how would I write code to make it change from Aries to another sign??? if anybody can answer that, thanks.. :) |
Re: Creating a Zodiac Sign Program in Visual Basic
You'll have to post some code. Don't forget to use the CODE tags. Also, are you using VB.NET or VB6?
|
Re: Creating a Zodiac Sign Program in Visual Basic
Quote:
<font color="red" font size="3"> I'm using VB.net 2005, here's my code... Public Class Frm0 Dim Mon As String Dim january, February, March, April, May, June, July, August, September, October, November, December As String Dim Dat As String Dim one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thrirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty, twenty_one, twenty_two, twenty_three, twenty_four, twenty_five, twenty_six, twenty_seven, twenty_eight, twenty_nine, thirty, thirty_one As String Private Sub Frm0_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click End End Sub Private Sub Button1_Clsick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn3.Click Txt1.Text = " " End Sub Private Sub Btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn2.Click If Mon = March And Dat >= twenty_one & Mon = April And Dat <= nineteen Then Txt1.Text = "Your sign is: Aries" End If End Sub End Class </font> </code> |
Re: Creating a Zodiac Sign Program in Visual Basic
humm weird, I wonder why it displayed <code><font></font></code>
|
Re: Creating a Zodiac Sign Program in Visual Basic
*rolls eyes*
its the # on the toolbar above the text field. replace {} with [] {CODE} {/CODE} use phpBB tags not html tags. |
Re: Creating a Zodiac Sign Program in Visual Basic
Quote:
:
|
Re: Creating a Zodiac Sign Program in Visual Basic
I don't see where you set Mon and Dat? All you do is define them without setting any initial value.
|
Re: Creating a Zodiac Sign Program in Visual Basic
:
|
Re: Creating a Zodiac Sign Program in Visual Basic
You seem to be laking an understanding of the basics of Windows programming. You should try a VB.NET tutorial before writing your first program.
Dat will not magically change, you have to read the value from the textbox (or calandar) and assign it to Dat. I don't think I can help you any further. |
Re: Creating a Zodiac Sign Program in Visual Basic
:
|
| All times are GMT -5. The time now is 4:16 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC