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


ADVERTISEMENT

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

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

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

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

Making A Quiz Using Access?

Aug 11, 2009

I have created my own quiz for my aplication, but, a lot of people asked me , why can't the programe count right or wrong answers and one of them told me can you make a quiz that randomly selects questions?ok, I told them its all posible to make , but I actually coulndt make it working.So, usualy for a classic quiz I got the code to make a button go red if the answer is wrong, but I need the code line for the random question selection and the counting.I found some code but it didn't work,

View 3 Replies

Making Quiz - Assigning Point Value To Variable Depending On Answer

Nov 15, 2010

I am thinking is to have a question, then between 2-4 answers, and depending on the answer a point value gets assigned to a variable, but then when that one question is answered you can click a button that moves to a next page type of thing with a new question on it. I think I could probably figure most of this out but when it comes to switching to a different question I am not sure how I would do that.

View 11 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

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

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

Making An Application That Uses Multiple WebBrowser Controls And Multiple Proxies?

Dec 17, 2009

I am making an application that uses multiple WebBrowser controls, and multiple proxies.The code for changing the proxy settings are as such:

#Region "Proxy"
Public Structure Struct_INTERNET_PROXY_INFO
Public dwAccessType As Integer
Public proxy As IntPtr

[code]....

Note: getRandomProxy gets a random proxy from a list.Problem is that whenever RefreshIESettings(getRandomProxy()) is applied, the proxy will be applied to all of the WebBrowsers, while i would need to have a unique proxy for each WebBrowser. Not having this would just error out the page in the other browsers and so on.

View 1 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

Making A Calculator With Multiple Function?

Nov 30, 2010

im making a calculator with multiple function but im stuck on two main parts on it. i wrote a big chunk of code for the total calculator. it adds, sub., multi., or divide the amount of numbers the user puts in and then it ask them to enter them in individually using a loops, radio buttons and a listbox. im stuck on the loop because it will as for the 1st number and the last number heres the [code]......

View 5 Replies

Making Multiple Words From 1 Word?

May 20, 2009

attached is my project on making multiple words from 1 word

This solves the word and has an option to save. Or it solves and saves all words in a list. I tried to do it with jokers using the jokers as every letter but it slows the program down drastically.

View 19 Replies

.net - Making A Search For Website Without Having To Nestle Multiple IFS?

Jan 4, 2011

I would like to search my database for products from a table(products)The problem is i do not want 600 rows of code with multiple if's.The code looks as following atm(do not want it like this)

Public Function GetSearchResults(ByVal County As Integer, Optional ByVal Searchtext As String = "", Optional ByVal Category As Integer = 0, Optional ByVal SubCategory As Integer = 0) As List(Of Product)
Dim dc As New DataClassesDataContext

[code]....

AND alot of elseifs and so on... The problem is that if the value is 0 at any of the above the search will be for all countys/categorys/headlines.... is there a better way to do this? i mean linq is great there have to be a way to make it more dynamic so i dont need the IFS.

View 4 Replies

Making A Web Browser Load Multiple Web Pages?

Apr 20, 2010

i have a program and i want it to visit a pre-set list of websites which will be in a richtextbox and i want it to visit all the sites in order BUT heres my problem that idk how to fix it will only load the last page of the list it will not load any other ones. Heres my code for it to visit the websites

For i = 0 To RichTextBox1.Lines.Count - 1
WebBrowser1.Navigate(RichTextBox1.Lines(i))

[code]....

View 8 Replies

Making A Console App That Displays Places For Multiple Times?

Apr 21, 2009

I am in a programming class, and am one of the best students in it, I even went to a state programming contest. One of the problems was to enter 6 race times and have it display the times back in order of which were fastest and their place such as

imput
11
15
12

[Code].....

View 3 Replies

Making A Program Send Multiple Fields To An Email?

May 20, 2012

i am making a program send multiple fields to an email, however i am just testing it in a small file to get it to work, however i can't get it to send the email with say 4 text boxes ill post some of the code below and wil lbe greatful for any help.

[Code]...

View 6 Replies

Making A Random Number That Rounds To Nearest Multiple Of 30?

Mar 4, 2009

The window is 600x600, because the game uses a 'grid' of thirty. Each food block is 30x30, and so is each block that makes up the snake. Here is my food making sub:

View 4 Replies

Making An Access Database Shared By Multiple User

May 8, 2009

Not sure if this is the right Forum to post this question. If not guide me where to post... I have an Access database that I would like to be able to share with Multiple user cuncurently... I have seen it is being done but I am not sure how? Or may be I should be using SQL Express.

View 1 Replies

Visual Basic: Making Multiple Forms For An Orde?

Mar 31, 2012

I've been working on this project for two weeks now and I'm drained from all the hiccups I've come across. Now I've hit a brick wall.I'm making a "simple" order form in Visual Basic 2010 that calculates the amount due for an order and then from the total determines what the shipping will be. I've been able to accomplish the following tasks:accept customer data (name, address, city, state abbreviation, zipcode)calculate total with shipping costs (accurately, for the most part)clear the order form and exitBut the way I have it right now, a customer can only put in 1 order form.

Problem: I have to figure out a way to allow a customer to place an order form for multiple items. (I'll assume that a customer will not place an order for more than 20 items). So what would be the best way to go about saving the information for multiple items then calculating the cost at the end?If it's multiple form creation, how is that done? Is the keyword "Container" the way to go, and how

Snippet Code:
Private Sub total_mouseleave(ByVal sender As Object, ByVal e As EventArgs) Handles total.MouseLeave

[code].....

View 2 Replies

Making A Button Perform Multiple Tasks In Order With Space In Between?

Dec 27, 2009

Like, I want a button to start five different timers, but at 1.5 second intervals. How could I make this button start timer1, wait 1.5 seconds, start timer2, wait 1.5 seconds, start timer 3, etc, etc?

View 2 Replies

Making A Simple Game - Multiple Hotkeys - Simultaneously Go Up And Left

Jun 9, 2011

I'm making a simple game. I want simultaneously go up and left.

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
' If e.KeyCode = Keys.Z Or e.KeyCode = Keys.Up Then

[CODE]...

Left, right, down and up work. now diagonal.

View 1 Replies

Making Multiple Copies Of A Data Bound Object From A DataGridView - How To Decouple Them

May 19, 2009

I have a DataGridView object to which I've bound a list of objects (of type Asset) returned from a database query.I'm programming in VB using Visual Studio 2005.I want to grab two copies of the bound object (calling them oldAsset and newAsset) from the selected row in the DataGridView, update newAsset based on input from other controls on the form, and pass both oldAsset and newAsset to a function that will update the appropriate record in the DB.I try to grab the two copies like this:

Dim currentRow As DataGridViewRow = Me.AssetDataGridView.CurrentRow
Dim newAsset As Asset
newAsset = currentRow.DataBoundItem

[code]....

Opening a watch window on oldAsset and newAsset indicates that the appropriate values are pulled at this point. But when I try to change a property of just newAsset, like

newAsset.CurrentLocationID = cboLocations.SelectedValue

I see that the corresponding value in oldAsset is also changed. This is not what I want, but it's obviously what I'm telling the computer to do.

View 1 Replies

Best Way For Creating Quiz

Jun 21, 2010

I would like to create a quiz and wonder what is the best way.

1. Using a textfile to read in the questions/answer
2. Using radio buttons
3. Or something else you suggest?

View 2 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







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