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.
Printable View
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.
Welcome to the forums.
Are you just telling us what you're up too, or do you have some kind of question?;)
my apologies! i am new to using visual basic and would like to know how to make this program!
thank you.
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).Quote:
Originally Posted by DroopyPawn
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.
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.