View Single Post
 
Old 03-15-2015, 09:35 AM
PeetSoft's Avatar
PeetSoft PeetSoft is offline
Centurion
 
Join Date: Jun 2003
Location: HHW - the Netherlands
Posts: 184
Default

read the whole textfile; textline=soubor.readtoend()

dim lines() as string = txtfile.split(vbcr)
dim c as integer=textline.count

Randomize()
Dim line As Integer = CInt(Int((c * Rnd()) + 1))

dim ques as string = lines(line)
dim Q() as string=ques.split("|")

dim question as string=Q(0)
dim ans1 as string=Q(1)
dim ans2 as string=Q(2)
dim ans3 as string=Q(3)

form2.label1.text=question
form2.label2.text=ans1
form2.label3.text=ans2
form2.label4.text=ans3
form2.show
__________________
-----------------------------------------------------
If debugging is the art of removing bugs, then
programming must be the art of inserting them.
I do comply with Flyguy's signature (If he still had one)
Reply With Quote