![]() |
|
| View Poll Results: which Programming Langugaes do you guys like?? | |||
| C++ |
|
3 | 42.86% |
| Visual Basic |
|
2 | 28.57% |
| Java |
|
2 | 28.57% |
| Other |
|
0 | 0% |
| Voters: 7. You may not vote on this poll | |||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
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.. ![]() |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
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?
|
|
|
|
|
|
#3 | |
|
Newbie
|
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> |
|
|
|
|
|
|
#4 |
|
Newbie
|
Re: Creating a Zodiac Sign Program in Visual Basic
humm weird, I wonder why it displayed <code><font></font></code>
|
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
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.
__________________
i dont know much about programming but i try to help |
|
|
|
|
|
#6 | |
|
Newbie
|
Quote:
Ooh thanks, but never heard of phpbbs, I guess it's because I'm learning PHP.. |
|
|
|
|
|
|
#7 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
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.
|
|
|
|
|
|
#8 |
|
Newbie
|
Re: Creating a Zodiac Sign Program in Visual Basic
yeah I got the values under those, the stupid thing kept throwing errors about who knows what... I did Dat = "January" and Dat = january kept throwing errors that I can't do that, so I removed them and just did seperate dims for the numbers and months, that worked fine, it does display what I put in betweeen " " but it doesn't switch when you select a different month or date |
|
|
|
|
|
#9 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#10 |
|
Newbie
|
yeah, I'll just stick with C++, I have better knowledge with that than anything but HTML... Last edited by Rick; Mar 4th, 2008 at 4:49 PM. Reason: fonts didn't show up... |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Visual Basic to java HELP! | araujo2nd | Visual Basic .NET | 1 | Feb 13th, 2008 9:36 AM |
| Visual Basic 2005 Express Edition For Dummies | ReubenK | Book Reviews | 3 | Jul 31st, 2007 8:47 AM |
| Plz Help - Visual Basic .net/visual C++ .net Code | VBuser | C++ | 14 | Jan 22nd, 2007 9:54 AM |
| visual basic pixel image comparison | youngnoviceinneedofhelp | Visual Basic | 3 | Mar 19th, 2006 1:57 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |