I want to make a program that has a file called "quotes.txt", with a different quote on every line. When the user clicks a button, it will get the amount of lines in the "quotes.txt", randomize a number in between 1 and the number of lines. And then go to the line of the number it just randomized. So for example:
Number of lines in "quote.txt" = 10
Randomize a number between 1 and 10
number is 4
Go to line 4 of "quote.txt"
Display line 4 of "quote.txt" in a textbox
Is it possible to do all of this? Im not sure how to do any of this. Could someone make up the code for this, because im not really good with reading from a text file...
thanks...
Number of lines in "quote.txt" = 10
Randomize a number between 1 and 10
number is 4
Go to line 4 of "quote.txt"
Display line 4 of "quote.txt" in a textbox
Is it possible to do all of this? Im not sure how to do any of this. Could someone make up the code for this, because im not really good with reading from a text file...
thanks...