Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

View Poll Results: which Programming Langugaes do you guys like??
C++ 4 44.44%
Visual Basic 3 33.33%
Java 2 22.22%
Other 0 0%
Voters: 9. You may not vote on this poll

Closed Thread
 
Thread Tools Display Modes
Old Mar 3rd, 2008, 3:13 AM   #1
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
Smile 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..
Rick is offline  
Old Mar 3rd, 2008, 7:16 AM   #2
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 712
Rep Power: 10 OpenLoop is on a distinguished road
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?
OpenLoop is offline  
Old Mar 3rd, 2008, 7:32 AM   #3
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
Smile Re: Creating a Zodiac Sign Program in Visual Basic

Quote:
Originally Posted by OpenLoop View Post
You'll have to post some code. Don't forget to use the CODE tags. Also, are you using VB.NET or VB6?
<code>

<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>
Rick is offline  
Old Mar 3rd, 2008, 7:34 AM   #4
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
Re: Creating a Zodiac Sign Program in Visual Basic

humm weird, I wonder why it displayed <code><font></font></code>
Rick is offline  
Old Mar 3rd, 2008, 7:38 AM   #5
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 348
Rep Power: 9 mrynit is on a distinguished road
Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
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
mrynit is offline  
Old Mar 3rd, 2008, 7:41 AM   #6
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
Smile Re: Creating a Zodiac Sign Program in Visual Basic

Quote:
Originally Posted by mrynit View Post
*rolls eyes*
its the # on the toolbar above the text field. replace {} with []
{CODE} {/CODE}

use phpbbs tags not html tags.


Ooh thanks, but never heard of phpbbs, I guess it's because I'm learning PHP..
Rick is offline  
Old Mar 3rd, 2008, 5:38 PM   #7
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 712
Rep Power: 10 OpenLoop is on a distinguished road
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.
OpenLoop is offline  
Old Mar 4th, 2008, 10:35 AM   #8
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
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


Rick is offline  
Old Mar 4th, 2008, 10:55 AM   #9
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 712
Rep Power: 10 OpenLoop is on a distinguished road
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.
OpenLoop is offline  
Old Mar 4th, 2008, 4:48 PM   #10
Rick
Newbie
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 Rick is on a distinguished road
Send a message via AIM to Rick Send a message via MSN to Rick Send a message via Yahoo to Rick
Smile Re: Creating a Zodiac Sign Program in Visual Basic

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...
Rick is offline  
Closed Thread

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:22 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC