|
-
January 30th, 2009, 02:00 AM
#3
Re: [2008] Quiz Program array
A few things before we continue ....
1) Please use code tags when posting code... [Code] Your Code Here [/code]
2) Be more specific about what problem your having .. It's doesn't help saying "it's not working", Tell us what is it doing, or not doing.. what line of code gives an error, and exactly what error your getting ..
 Originally Posted by siradammeathead
I am looking to declare an array of 20 intergers to store the answers to the questions....
I can see you're doing that..
Code:
Dim answers(19) As Integer
 Originally Posted by siradammeathead
and then for the next button i am looking to get the answer and write it to the array. If one radio button is checked then i want it to write 1 to the array.
You doing something like that here
Code:
If Not ((txtAnswer.Text = "1" And RadioButton1.Checked) Or (txtAnswer.Text = "2" And RadioButton2.Checked) _
Or (txtAnswer.Text = "3" And RadioButton3.Checked)) Then
 Originally Posted by siradammeathead
Then finally i want to write the username, the array of answers and score to the txt file. How can I do that?
Again it looks like your doing something like that too
Code:
fw = New StreamWriter("J:\quizfile.txt", True)
fw.Write(ControlChars.CrLf)
readstring = Intro.txtName.Text
readstring2 = lblScore.Text
fw.Write(readstring)
fw.Write(" Score: ")
fw.Write(readstring2)
fw.Close()
So looking at what you posted you've already answered your question..
If you are more specific, we can be more specific in helping you..
Gremmy..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
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
|