Windows Form Application

Posts 12 of 2 · Page 1 of 1
Windows Form Application
Well, I have this project for school and Im working with my teacher to make a Nomenclature Test in C++

Well, I have two forms

Form1.h : Will ask for name of the student and display a "Start Test" button
Form2.h : Will display the question in a label, a textbox for the answer, and a button for the next question

This is the code:
Code:
Form2::"replace with name of label for question"->Text = "Question 1: NaCl";





{
 ////////////////////Question 1////////////////////
				if (Form2::Answer->Text == "sodium")
				 {
					 MessageBox::Show("Correct","Correct");
					 Form2::grade->Text = "Grade: 10 points";
				 Form2::Stuff->Text = "Question 2";
				 }
				 else
					 {
////////////////////Try 1////////////////////
						 MessageBox::Show("Incorrect","Incorrect");
						 Form2::Stuff->Text = "Question 1: NaCl";
						 if (Form2::Answer->Text == "sodium")
						 {
							 MessageBox::Show("Correct","Correct");
							 Form2::grade->Text = "Grade: 10 points";
						 Form2::Stuff->Text = "Question 2";
						 }
						 else
							 {
////////////////////Try 2////////////////////
						 MessageBox::Show("Incorrect","Incorrect");
						 Form2::Stuff->Text = "Question 1: NaCl";
								 if (Form2::Answer->Text == "sodium")
								 {
									 MessageBox::Show("Correct","Correct");
									 Form2::grade->Text = "Grade: 10 points";
								 Form2::Stuff->Text = "Question 2";
								 }
								 else
									 {
								 Form2::Stuff->Text = "Question 1: NaCl";
								 }
						 }
				 }
				 
			 }
Does anyone know how I can do this but in a simpler manner? Im asking because there going to be 50 questions in each test version and there are going to be 5 versions in the program.
Provides static methods and properties management methods, such as start and stop the program procedures for managing Windows messages, and attributes to obtain information about the program of the application. This class can not be inherited.
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?