Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hello

 

I need to display different things (either radio or check boxes) on a form (I need to do a survey) from a file, but i also need to display the answers from the same text file, can I do this with stream reader??? (in other words can set some lines to a variable)if so how would the syntax be??:) :) (the book I have doesnt have any instructions on how to do this)

 

text file:

radio buttons

pizza, tacos, burgers, salads

 

(pizza, tacos, burgers, salads are the answers on the survey)

 

Ineed to do this because the user can't program, so they only need to modify the text file without programming

Any suggestions, comments, or any better way to go around this???

 

Thanks in advance:D :D

  • *Experts*
Posted

Im not sure what you mean :)

You want to read a file, create a radio button for every option, and the check if the correct one was checked?

Posted

well the professor wants a program where he can modify the text so the program will run according to his instructions, however hes a psyc prof. so he can't program. The text file will say what kind of questions it is (radio buttons or check boxes).

 

Thats the part I am worried about, how can I check the text file in order to set the check box or radio button visible?

 

I know just found out about the input function, i'll play around with that,till then I don't know how to go around it.

 

Thanks :D

  • *Experts*
Posted

I think an XML file would be great for this kind of thing. Its a lot easier to navigate than normal files.

Im still not sure about the rest becuase you didnt answer my question :).

Posted

Sorry for not making my self clear I do want to read a file, create a radio button for every option, and the write to another file which button was chosen, i got the program to read from the file so i can display the question and answers, but i am only able to read the first question, still working on that.....

 

about the suggestion, yes it could problably be done in other ways, xml would problably be the best one, but for some reason they just wanted a standalone program. (it would have made my job easier)

Posted
Sorry for not making my self clear I do want to read a file, create a radio button for every option, and the write to another file which button was chosen, i got the program to read from the file so i can display the question and answers, but i am only able to read the first question, still working on that.....

 

about the suggestion, yes it could problably be done in other ways, xml would problably be the best one, but for some reason they just wanted a standalone program. (it would have made my job easier)

 

------------------------------------------------

Here is the code to Read From File

Dim TestFile As FileStream = New FileStream _

("C:\test.txt", FileMode.Open)

Dim FileReader As StreamReader = New StreamReader(TestFile)

TextBox1.Text = FileReader.ReadToEnd

TestFile.Close()

FileReader.Close()

Creativity Beyond Imagination

http://www.facelessmaster.tk

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...