Code for creating visual.net quiz

This small tutorial will show you how to create a multiple choice quiz using Visual Studio. While surfing the net I came across lot’s of different articles where people promise you the code and fail to deliver. This article will give you a working quiz.

Before we begin I would like to say a special thankyou to 2 people for making my online quizzes and this tutorial possible. They are Paul Ishak

and leshay

They are the real programmers in all of this.

I am using Visual Studio Ultimate 2012 for this tutorial so let’s open it up and get cracking.

First you need to click on File then left click on New Project you will then see a pop up window like the one below. If you look in the screen print below there are 3 input boxes labelled

Name

Location

Solution name

These 3 items are fairly self explanatory, where it says name choose a name for your project and type it in ( make sure you delete the wording that is allready there.)  ie WindowsApplication4

So I want you to call your quiz MultipleChoiceQuiz like I have done below. You will notice when you change the Name the Solution name will also change

The Location box is where you want to save your filles to. Visual studio will automatically save your files to a default location. I think this is best left alone for people just starting to learn there away around Visual Studio.

Now you have changed the name of your project you will now click on Windows Forms Application, You can either double left click on it to open it up or you can left click once to highlight it then click on OK

Your project will now open like mine has in the screen print below. You have actually just created your first form ๐Ÿ™‚ but dont get to excited yet ๐Ÿ™‚

You can see where it says Form1 in that little window ( thats the little window your users will see when they open your quiz) we are going to change that to say something a little more interesting. How about My first quiz So put your mouse cursor in the center of that little window and right click on it, then left click on Properties

After left clicking on properties a new window will open you have not seen before like it has in my screen print below. And what do you know it has highlighted by default the line we want to change. So you can see where it says Form1, I want you to double left click with your mouse and it will become highlighted. You can then change that text to say Multiple Choice Quiz

You can see from the screen print below that I changed my text like you just did.

Now let’s go back to design view and see what we have acheived. To get back to design view all you need to do is look at the top of your Visual Studio application and left click on the Form that says Form1.vb [Design] just look at my screen print below we all have it ๐Ÿ™‚ at the momment you should have the properties tab highlighted so just click on Form1.vb [Design]

Now you have clicked on the design tab your window should of changed to the one below. Now it looks like we are getting some where. You have just changed the text to give your quiz a nice little title.

page 2 of this lesson will show you how to change the background color of your form so click here toย carry on