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


ADVERTISEMENT

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

2008 Windows Form - Get Percentage Of Right Answers In A 10 Question Math Exercise?

Feb 1, 2011

I have a form with 10 math questions. Beside each question there will appear a check mark if it is right and a X if its wrong. I also have a label that will display a score in percentage. If 2 are right then it will display 20%. If they are all right then it displays 100%. My problem is ...how can I code the event. I thought of case select, but that would mean 100 cases to make it work.( If check1 and check2 are visible then display 20%, but if its check1 and check 7? Thats alot) What I want ot know if there is an easier or shoter way to ontain the same result. I am working with Visual Basic 2008.

View 7 Replies

Cannot Get My Questions To Appear On The Buttons On VB 2008

Apr 2, 2012

im stuck programming a visual basic quiz.I cannot get my questions to appear on the buttons on visual basic 2008 and do not not why not.

[code]...

View 15 Replies

Retrieve Random Data (questions) From Access 2007 Using Vb 2008?

Mar 3, 2012

how can I retrieve random data(questions) from access 2007 using vb 2008?

View 4 Replies

VS 2008 Creating Game - Randomly Selecting Questions By Clicking Button

Jan 13, 2010

I am creating a "Who wants to be a millionaire" game. Lets say I have 100 questions in a listbox. How can i randomally select a question by clicking a button.

View 11 Replies

VS 2008 : Fix Unwanted Space Added Between Grid And Right Form Side?

Nov 11, 2011

I have an application that runs in full screen. Controls are placed different when screen resolution is changed :
1024x768 :

1280x1024:

How to fix unwanted space added between grid and right form side,as in last image (1280x1024) ?

View 6 Replies

[2008] Express Edition - Create A Variable /add Up The Score Of Correct And Incorrect Answers?

Feb 27, 2009

i am creating a quiz which would be 20 questions for software design students and may use alot of code.my first problem is the score for the test, i know a friend of mine can add up the score but he cant move onto the next thread until you have got the question correct which is sort of cheating, i want to know how you create a variable and make that variable stay in all the forms and add up the score of correct and incorrect answers and come up with a final score for the user in the end.

View 8 Replies

VB 2005 - Register Form - Store The Added Username And Pasword To The Login Form?

Mar 11, 2010

i have a main menu on my program which has the option of registering. I have enter name and password ..and a button Confirm

i want to be able to store the added username and pasword to the login form so that it will work...

what must i do? also where would this data be stored...

View 4 Replies

Questions About Picturebox And Images?

May 6, 2011

I have made a screensaver in VB.NET. I am running into some roadblocks in the code though. The idea first was to have a ball bounce across my screens. It then evolved into spawning new balls that bounce across the screen. I then added collision detection so they would bounce off each other. Here is the problem that came up:

When said balls overlap each other, you can easily distinguish the edges of the picturebox that holds the images. I have made the background of the picturebox transparent, made the bitmap with a magenta background and made magenta transparent (for the image), but I can still see the picturebox edges when they overlap. It seems the transparency is not only making the background transparent, but giving it X-RAY vision to display not the visible area behind it, but the root background color of the form. here is a sample of the code which makes the transparencies.

Private Sub frmscr_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim bmp As Bitmap = My.Resources._smiley_face_image
Dim clr As Color = Color.FromArgb(255, 0, 128)
bmp.MakeTransparent(clr)

[code].....

I also tried to see if changing the image from background to foreground would help...no such luck.

View 4 Replies

Game Programming :: How To Randomize Questions

Jul 28, 2010

I am making a game on vb.net. It is like a quiz game. In the game there is a button which when pressed pops up a question. The code for the input box is as follows:

Dim Answer As String = ("sodium chloride")
Dim Question = InputBox("You have mixed Sodium and Chloride. What is the ionic bond name of this?", "Question?")

[code]......

View 4 Replies

Generating Random Questions In A Vb2008

Sep 5, 2009

Iam doing a project in vb2008 for a quiz program. i want to randomly generate questions in a textbox a question should occur once in the quiz session. i had my code:

Imports System.Data
Imports System.Data.OleDb
Imports AgentObjects

[CODE]...

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

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

Two Dimensional Array - Create A Questionnaire With Questions

May 30, 2012

I need to create a questionnaire with ten questions. The questions can be hard coded as labels. I will have a radio group box for each question, with options, Always, Usually, Sometimes, Seldom and Never. I will then need to store these values for each time that the questionnaire is answered, and another button that will show the question number and the answer count for each question up to that point in time e.g. [Code] I am also assuming I will have a button that when clicked, will identify the active radio button and add 1 to a counter? [Code]

View 13 Replies

Added Three Subroutines To A Form?

Oct 30, 2009

I recently added three subroutines to a form, and as a result of adding only the three subroutines, I have noticed some weird behavior in the form and I can't pin down why these three subroutines would cause it.

View 16 Replies

Getting Answers Into Decimal And Calculating

Feb 10, 2009

I'm trying to get the answer "dblcost" to go into 2 decimal spots. Sometimes it does, sometimes it doesn't.Also, I have to create something that continually adds each transaction to lblfinalcost. Mine seems to be a little buggy.Right not I have strfinalcost = strginalcost + dblcost. Another question i have is how do I make a number default into the textbox? I want it to say 1, but be able for the user to delete it and then replace it with their own number.[code]

View 14 Replies

Signature For Msdn Answers?

Dec 12, 2009

if you are a constant answerer here on msdn, and do not have a unique signature, or no signature at all, please take a little time to create one... eason ..when quoting a post of a member, if no signature available, then it would have to be followed w/ "quoted from so and so's post", this so so said this, etc.

View 16 Replies

Stop Repeating Same Answers

May 25, 2009

there are 8 text boxes where user should put 8 answers, but when he type one answer in one text box it cant be found in some other text box.Basically when button is clicked there should be check for repeated answers.

View 3 Replies

Control Added On The Fly Is Added To The Wrong Location Of An Auto-scroll Panel?

Jun 21, 2010

I have a program that adds controls on the fly to an auto-scroll panel. When the panel is scrolled (viewing the bottom of the panel for example) and a control is added, it looks like it is added assuming the top left corner of the panel is still at 0,0 when in fact it may be 0,500. To see what I am talking about, create an empty "Windows Forms Application" project and insert the below code into it.

Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents btnAdd As System.Windows.Forms.Button
Dim ButtonCount As Integer

[code]......

View 4 Replies

Copy And Paste Code A Few Times And Rename The Questions

Dec 31, 2011

A while ago I wrote a quick and very very simple program to test myself on about 10 questions I needed to remember the answer to. I made a form with a label, text box and button. the label contained the question and the answer was entered into the textbox and the button was pressed to check the answer. the code i used was very similar to this:[code] Because I only had 10 questions it was fine to copy and paste the code a few times and rename the questions but now i am going to use this again but for a lot more questions (in the end there will be a couple of hundred) so i was wondering if any one knew a better way to do this? I was thinking maybe an array like 1 to hold the questions and 1 to hold the answers but i haven't worked much with arrays so I'm not sure how difficult this would be ?

View 1 Replies

Randomly Select The Questions W/ Answer In Database(mysql)?

Aug 28, 2011

I'm started my project and here is my code.

con.Close()
con.Open()
com.CommandText = "SELECT * from math.questions where number ORDER by rand() limit 1"

[code].....

View 1 Replies

Add A List Box To Form That Was Added During Runtime?

Dec 22, 2009

I am having trouble adding a list box to a form that I have added during run time.[code]...

View 3 Replies

Added 2 Textboxes On Form And Runs It

Jun 2, 2011

I added 2 textboxes on the form and runs it...I pressed the enter after I type in simple text.. it will not goto next textbox but tab can do.

View 7 Replies

Added A Datagrid At Runtime On A Form?

Mar 21, 2009

1. i added a datagrid at runtime on a form. i want to bind a datasource to the datagrid in a button's click event handler, but the datagrid doesn't seem to be visible anywhere else outside the form load event where it is declared.how can i find the datagrid control?

2. and another beginner question.. how to i declare a string that spans multipe lines? i tried with the + operator like in c#, but it doesn't work.

View 5 Replies

Forms :: Controls Cannot Be Added To The Form?

May 9, 2010

1. What determines that some controls cannot be added to the form? (I tried several, not all of them)

2. Where does the image for Column 1 About form come from?

View 7 Replies

How To Select Last Added Record From Sql In VB Form

Apr 15, 2012

I wana know how can i use a value from a sql table that i added from another form?It basically supposed to validate that whatever was the last recorded added in the other form(eg formA) , i must then use those same values from the sql , into another form(eg formB).If i type a value in the textbox( in formB), it basically must validate that, the value i typed in, is not the record that was enterd in the other form(formA) (the last record added in that form)

Here is my coding that i did:
Dim conmid As New SqlClient.SqlConnection("Data Source=CHETS-TOSHIBASQLEXPRESS;Initial Catalog=PlanetDiscLibrary;Integrated Security=True")

[code].....

View 9 Replies

Displaying The Equation And Answers In A Listbox?

Apr 27, 2012

First off the listbox needs to show the equations for the number entered between 0 and 12 example:

1+1=2
1+2=3
1+3=4

[Code]....

View 7 Replies

Error With Compare Answers Function?

May 12, 2012

When Score exam is clicked, the answers from the keys file is read using ReadLine method 6 times to fill the Answer Array. then the users' answers and the answers from the keys will be paired up by calling "Compare_Answers" function in the RMV Global Module. and calculate the score and it will show on the main form.

View 9 Replies

VS 2010 How To Line Up Answers In The Listbox

Oct 18, 2010

So far this forum has been awesome answering my questions in full. I am very new to Visual Basic but I enjoy learning about it greatly. My question now is I now need to get all of my answers lined up neatly in the listbox using "zoning." Now I have know clue how to start this. Basically I need to make this..

Sum: 5 = 2 + 3
Difference: -1 = 2 - 3
Product: 6 = 2 * 3

[code].....

View 1 Replies







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