Multiple Choice Quiz - Make Some Arrays Like Questions(20) And Answers(20)?

Mar 4, 2011

trying to make a Multiple Choice quiz, with 20 questions

-4 RadioButtons

-2 Label (Reading the Questions) and 1, keeping a score count

Do I wanna make some arrays like Questions(20) and Answers(20)

Dim ScoreCount as Integer

So I want it to be a little screen, and once you click a Radiobutton to choose answer, it will change the label to Question(2) so forth.. but I am unsure how to do this. I am fairly new to vb, im doing this to learn.How do I make it so everytime you click a radiobutton wether it's right or wrong, the next question and possible answers all change??

View 1 Replies


ADVERTISEMENT

Multiple Choice Quiz With Access, Get 3 Levels Of Answers?

Nov 22, 2011

I am working on a multiple choice quiz, admin screen, student login screen where they choose their level of difficulty. I have been able to start the quiz, have the questions and answers filled, user answers question, check if correct or not, if correct then the score is incremented.I am able to set up a variable for 'level' and want to write some code so that whatever is selected then that table / questions will be selected and displayed to the user.

The way I'm thinking at the moment seems very long winded. I think I'll have to write an IF ELSE statement/case statement for each of the 'navigaterecords' and the sql statment for beginners, intermediate and advanced.Assume there is a variable 'LEVEL' - have not actually done this yet. Where the code refers to 'advanced' is where I have been trying it out to select questions from the advanced table.

Imports System.Data
Imports System.Random
Imports System.Data.OleDb

[code]....

View 8 Replies

Make A Multiple Choice And True Or False Quiz

Jan 22, 2011

I have to make a multiple choice and true or false quiz in VB. So i am thinking of two questions on one form.BUt i have to make the questions appear in random and not in order and make sure they dont repeat.Btw, i have searched a long time for this. I have found out how to make random numbers. But I have to make sure only 10 come and not repeated.

View 11 Replies

Creating Array For Multiple Choice Questions

Nov 3, 2011

I am in the process of creating an array for a set of multiple choice questions but I am having a few problems. I am an absolute beginner at VB and I am creating a quiz that users will select one of three possible questions and then depending on their answer a +1 value will be added to the score. However I do not know where my questions and answers are supposed to go, from what I have read online I have to use (0, 1) format to give possible answers but I do not know how I would make the questions and answers display in textboxes on my form. At the bottom of my code I have also included code to randomise the questions although I am unsure as to if it is correct. At the moment I can run my form fine without any problems but my main issue is to how I will get the questions and answers linked to my textboxes on my form.

Public Class frmTest
Private ran As Random = New Random()
Public intScore As Integer
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
'Turns the message box invisible when start is clicked
lblMessage.Visible = False
[Code] .....

View 5 Replies

Making A Multiple Choice Quiz?

May 10, 2009

I need a multiple choice quiz but I've ran into some problems. So far i have 5 arrays: one for the questions and four for the answers. The question is displayed in a label and the answers on radio buttons. Problem one: I am using a random number generator to pull them but this allows them to be reused. How do I stop repeats. Problem two, my grading isn't always working.

View 3 Replies

Multiple Choice Quiz With Access, Null Reference?

Jul 16, 2009

I have a button 'start quiz' which uses the dataset to fill the quiz form - ready for the user to start answering the questions.However, I am getting a 'null reference' at the point where the 'navigate records' on the quiz form is called. Have looked up that it means I have a variable that is null. But I have declared all the variables etc. Not sure what I'm doing wrong. I am very new to programming and I have spent quite a bit of time on this already.This is the code for the student user login:

Private Sub btnLoginStudent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoginStudent.Click
FrmQuiz.Show()

[code].....

View 9 Replies

Quiz Program - Asking Five Questions With Yes Or No Answer

Mar 19, 2009

I'm trying to make a quiz application with Visual Basic at the moment. I want to write a routine that asks five questions to which the answer must be either Yes or No. It must add up the number of Nos and if the number of Ns is less than two then print out "pessimist", otherwise print out "optimist". So far this is the design of what I've done. [URL]. However, I have no code which I've produced on my own.

Code:
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class

I really don't know how I can kind of add up all the results from each individual question, seeing as radio buttons are used.

View 2 Replies

VS 2008 Script - Form In Which Have Added 5 Questions - Each Question Has 3 Possible Answers

Sep 4, 2009

I got a form in which i have added 5 questions , each question has 3 possible answers , so if a user selects the correct answers then when he hit the OK button he will pass the quest ... if he hit the OK button without having the right answers selected , i want to show him which answers are not correct .. show him which answers he selected ..

View 11 Replies

Using 2 Arrays To Make Random States Capital Quiz?

Nov 29, 2011

I have to make a program that uses 2 arrays, one with the states name and one with the capitals names. I have to make it to where it randomly selects a state and asks you what the capital is, and gives you 4 choices in the 4 radio buttons provided. My problem is getting one of the randomly selected answer choices to be the Correct answer.

Here is my code so far:
Public Class USCapitals
' Declare module level variables.
[Code] .....

View 3 Replies

Make Quiz System Using .net?

Mar 31, 2011

I make a 2 questions and then 4 choices for each question..and the 4 choices is made up with radiobutton.. and 1 of the 4 choices is only the right answer..Computing of right answer in each question is the thing that I want to know, how to do..

View 1 Replies

VS 2008 How To Make A Quiz

Mar 11, 2011

I want to make a quiz that generates score and save in access 2007.

View 4 Replies

Make The Textboxes Only Accept Letters A, B, C, Or D As Answers From The User?

Nov 15, 2011

I'm having trouble with the Try...Catch code. I'm trying to make the textboxes only accept letters A, B, C, or D as answers from the user. I'm also having trouble matching the two arrays. I wanted it to be like if textbox1 is A then it is correct but in a loop. Please take a look at my code.

This is the programming challenge instruction for reference: The local Registry of Motor Vehicles office has asked you to create an application that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions. Here are the correct answers to the questions:

[Code]...

View 9 Replies

Make A Quiz Result Permanent?

Mar 31, 2009

The Quiz is timed. Its result is in "m:s" format. How to make this result permanent, i.e. when the game is restarted the results would still be there?[cod]e...

View 5 Replies

Make A Quiz Result Sortable?

Apr 2, 2009

Make a Quiz result sortable? Option Strict On[code]...

View 2 Replies

Coding A Multiple Choice Program?

Feb 24, 2009

I'm not great with VB and I'm having some trouble with my University assignment at the moment.I'm trying to code a multiple choice program with several forms with different questions and then a scoring form

I'm not sure how to tell VB what the correct answer should be and how to display the scores in another form, the answers need to show how many correct in each section out of how many the user attemped to answer, so they can check scores before completing all the questions.

View 5 Replies

Create A Multiple Choice Survey?

May 13, 2012

I'm currently quite new to VB and am trying to create a multiple choice questionnaire for work. This is a depression survey in which there are 23 groups of statements with 4 options per group. Every time a patient clicks an option, the next set of 4 questions comes up on the screen.

I'm trying to convert the old VB4 code into the new VB 2010 code. Before we were using a control array and the code looks a little something like this[code]...

View 2 Replies

Make A Simple Quiz Style Web Application ?

Feb 27, 2012

I am learning VB at the moment and i'm planning how i'm going to make a simple quiz style web application. I want to have a series of questions, one per panel, that a user can select from multiple choice and proceed to next question with at least one option needing to be selected before going to the next question. At the end users get their score out of X.

Forgetting the validation and other bits i need. My thinking is to use a series of panels that have my questions in, so one panel per question, and by default they are all set no invisible bar the first question. Then as the user selects the question the next panel is revealed and the previous hidden, and so on etc.

View 1 Replies

VS 2005 - Make A Quiz In VB - Label - Textbox And Two Buttons ?

Oct 13, 2009

Im trying to make a simple quiz in visual basic all it has is a label a textbox and two buttons. one of the buttons if for checking if the answer is rite while the other is to go to the next question. i want to make it so when the next question button is clicked the label changes to the next question and the textbox is cleared and then when i press check it checks the answer.

View 6 Replies

VS 2010 : Roadblock With Simple Multiple Choice Form?

Apr 3, 2012

I am trying to create a simple program that delivers True/False questions from a text file and then displays the mark to the student, but I'm running into trouble.I created two forms. The first contains a listbox which is populated with the possible test choices (taken from a .txt file containing only 2 choices). I wrote this code for the listbox

Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Populates listbox with test names from TESTS.txt
Dim sr As IO.StreamReader = IO.File.OpenText("TESTS.txt")
lstTest.Items.Clear()

[code]....

After the test is chosen, the user presses BEGIN. At this point I have my actual Question form pop up, and the first form is hidden. I tried to begin with an If-Then statement which will open the appropriate .txt based on the selection from the first form.

Private Sub frmQuestion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Opens appropriate test based on selection
If frmTest.txtChosenTest.Text = CStr(frmTest.lstTest.Items(0)) Then

[code]....

This is where I get completely bottle necked though. I've been staring at the screen/textbook for 5 hours now and I don't understand how to write the code that will take my questions from the (now open) text file, separate the question from the answer, and put the question and question number in the appropriate text boxes. The format of the question .txt's are simple. One question per line, with the answer following, separated by a comma. For example, Midterm.txt might look like this

Question1isthisone,T
Question2isthisone,F

If I were to design a form for this problem let's say it would look like this:I am currently stuck at this part though. How do I populate the two read-only text boxes with the question number/question, and then cycle through the questions from the .txt while also keeping the user's score?

View 13 Replies

VS 2008 4 Drop Down Lists, Select A Choice In One, All Get Same Choice?

Mar 12, 2010

I have four drop down lists here and I've assigned the datasource and displaymemberproperties so they are populated by a table. When I run the program and select a choice, all four of them get updated with the new choice.

View 3 Replies

Write Code For Single-answer Multiple Choice Tests?

Nov 28, 2009

I am struggling to write code for single-answer multiple choice tests (i.e. Choices A, B, C, D).

View 11 Replies

Make 'Button1' Open A External Program Of There Choice Using The File Browser

Feb 26, 2011

Question 1: How to make 'Button1' open a external program of there choice using the File Browser.

Question 2: How to send 'TextBox1.Text' to an external process

Question 3: How to save data in a .dll file made from Visual Basic

If anyone has source codes that I code edit for Visual Basic 10/08,And If you could sort of walk me through what I would need to edit to make it work for my programs

View 3 Replies

VS 2010 VB 2010 - Program For Multiple Choice Test?

Apr 2, 2011

I'm really new at programming and was looking for guidance about a project I have.I have to design a program that administers a multiple choice test to users. It delivers questions one at a time, from a predefined test file for the user to answer. It also marks and displays a score at the end of the test.

First, a QUESTION form verify's the user's registration status and access. The user provides a registration number and password and the program reads it from a "registration.txt" file to determine if the user is eligible to take the test (i.e., they are registered to take it). If it is correct, then the user presses the "Begin" button. If not, then a message appears and the student tries again to enter the information.

A read only text box will display the score at the end of the test (String with format correct/total) and the user can't retake the test.Second, a QUESTION form opens after clicking "Begin" on the entry form. The questions are going to be from a "testfile.txt" file.Each question is on multiple lines in the file. The first line consists of the question followed by possible answers followed by the correct answer ( 3 items are separated by "#"). The current question number and the question will be displayed in textboxes.'n'= possible answers; so each of the next 'n' lines provides a possible answer. All possible answers will be displayed in a Listbox.After the user selects an answer, an ''Enter'' button is pressed. This will submit and evaluate the answer. If nothing is selected a textbox should appear and display the error message (APPEARS ONLY IF THERE IS AN ERROR). After pressing ''Enter'', the next question is displayed.When all questions answered, the entry form is displayed again and displays the score.

I know that's a lot of information, but I wanted it to be really clear. Would it be best to cycle/loop the questions with a DoWhile loop? And how would I store the answers while the user goes through the test?

View 7 Replies

Loop Through Multiple Arrays?

May 7, 2009

I'm new to this, so sorry if my question has been asked before. I have searched but have not been able to find, or perhaps recognise, an answer. I am using visual studio 2008 and creating an app in vb.net.

I have 4 arrays named:- account1 account2 account3 account4. They all have 4 elements.I want to assign values to the elements in the arrays in an efficient manner. I thought two for next loops would do it. [code]....

View 3 Replies

Multiple Arrays To Text File?

Apr 29, 2010

trying to save users names and passwords from input boxes and save it as arrays in text file that in future multiple users will log in with their names and passwords
have this code so far but doesnt realy save the user info to file, dont even create file.

Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 15 Replies

Return Multiple Arrays From A Function

Mar 13, 2009

I want to go to a class.vb file that has a function from an aspx page and I want to return mutiple arrays. Is that possible? If so, how would I call it from the aspx page and how would I return it?

View 1 Replies

Search Multiple Arrays For A Specific Value?

Jan 8, 2009

I'm trying to find out a way to search multiple arrays for a specific value. I looked through here, yahoo, google and msdn and couldn't find anything specific to what I'm looking for. Don't have any sample code as I'm not quite sure where to start.

View 2 Replies

Storing Multiple Arrays Into A List

May 11, 2011

The scenario is:

1)A large 2 dimensional array (400,20)

2)The program needs to access particular chunks(for example (0,20) to (50,20)

3)The program will open multiple files and process each into it's own 2D array (400,20)

What I have right now is code capable of creating the array, but no way to store the array so that I can open a new file and process that data into another large array. Someone mentioned the generics List(of T) might be a good way to store each new array as you could use the Add function. I have done some research on the List(of T) class but I'm not totally convinced that is the way to go. I'm just looking for some direction as I've just started on .net this year.

View 7 Replies

Putting One .txt File Information Into Multiple Different Arrays

Apr 28, 2011

how to take a text file that was provided for my homework assignment, and put the information within it into 3 different arrays.[code]

View 2 Replies

Putting One .txt File Information Into Multiple Different Arrays?

Jun 10, 2011

i'm having issues where I can't figure out how to take a text file that was provided for my homework assignment, and put the information within it into 3 different arrays.The .txt file looks like so:tc.Amanda/Ashley have to be in the same array as well as 4/2, 166/20.This is what I've come up with for the snippet of code, and so far, it hasn't really been working right.

Dim namearray(MaxItems), rankarray1990(MaxItems), rankarray2009(MaxItems) As String
Dim Numitems As Integer
Dim sr As System.IO.StreamReader

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved