-
Jul 15th, 2007, 07:48 PM
#1
Thread Starter
New Member
[VB2005] Random fact generator/birthday generator
I wana make a vb program where on one page it generates facts from a text file to a text box by the click of a button (randomly) and also a separate page where u can select day & month to display corresponding famous birthdays from a text file.
-
Jul 15th, 2007, 07:52 PM
#2
Re: [VB2005] Random fact generator/birthday generator
Welcome to the forums.
Are you just telling us what you're up too, or do you have some kind of question?
-
Jul 15th, 2007, 08:03 PM
#3
Thread Starter
New Member
Re: [VB2005] Random fact generator/birthday generator
my apologies! i am new to using visual basic and would like to know how to make this program!
thank you.
-
Jul 15th, 2007, 11:46 PM
#4
Hyperactive Member
Re: [VB2005] Random fact generator/birthday generator
Randomly....
Read the facts into an array. Pick a random number n from 0 to Array.UpperBound.
Display ArrayItem(n) in the TextBox.
-
Jul 18th, 2007, 06:46 PM
#5
Thread Starter
New Member
Re: [VB2005] Random fact generator/birthday generator
Originally Posted by DroopyPawn
Randomly....
Read the facts into an array. Pick a random number n from 0 to Array.UpperBound.
Display ArrayItem(n) in the TextBox.
ok, ive put a random number generator in there, how can i convert it so instead of showing up numbers it shows up a line from the txt file? (each fact is on a line).
also, how can i do my birthday generator? I want to be able to do it from two drop down boxes to select day and month to display a birthday in a text box from a txt file.
-
Jul 18th, 2007, 10:33 PM
#6
Hyperactive Member
Re: [VB2005] Random fact generator/birthday generator
You need to read the text into the array, not the numbers. Then create one random number. Display arrayitem(number) to show the randomly selected text.
There are several ways to do the birthday part. But I'm wondering, if you should use a DatePicker control rather than ComboBoxes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|