GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Nov-2008, 09:17
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Trivia quiz game


i have to make a triva game and dont know vc++ well so there might be some stupid errors in there but i dont know how to fix the errors. im only 12 so go easy on me
CPP / C++ / C Code:
#pragma once


namespace project {
	int question, ranswers, answers;
	char radiobutton1, radiobutton2, radiobutton3, radiobutton4;

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  exit;
	protected: 
	private: System::Windows::Forms::RadioButton^  radioButton1;
	private: System::Windows::Forms::RadioButton^  radioButton2;
	private: System::Windows::Forms::RadioButton^  radioButton3;
	private: System::Windows::Forms::RadioButton^  radioButton4;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::ContextMenuStrip^  File;
	private: System::Windows::Forms::ToolStripMenuItem^  helpToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  exitToolStripMenuItem;
	private: System::Windows::Forms::Button^  go;

	private: System::ComponentModel::IContainer^  components;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>


#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = (gcnew System::ComponentModel::Container());
			this->exit = (gcnew System::Windows::Forms::Button());
			this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton4 = (gcnew System::Windows::Forms::RadioButton());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->File = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
			this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->go = (gcnew System::Windows::Forms::Button());
			this->File->SuspendLayout();
			this->SuspendLayout();
			// 
			// exit
			// 
			this->exit->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->exit->Location = System::Drawing::Point(497, 399);
			this->exit->Name = L"exit";
			this->exit->Size = System::Drawing::Size(134, 41);
			this->exit->TabIndex = 0;
			this->exit->Text = L"Exit";
			this->exit->UseVisualStyleBackColor = true;
			this->exit->Click += gcnew System::EventHandler(this, &Form1::exit_Click);
			// 
			// radioButton1
			// 
			this->radioButton1->AutoSize = true;
			this->radioButton1->Location = System::Drawing::Point(88, 220);
			this->radioButton1->Name = L"radioButton1";
			this->radioButton1->Size = System::Drawing::Size(14, 13);
			this->radioButton1->TabIndex = 1;
			this->radioButton1->TabStop = true;
			this->radioButton1->UseVisualStyleBackColor = true;
			this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);
			// 
			// radioButton2
			// 
			this->radioButton2->AutoSize = true;
			this->radioButton2->Location = System::Drawing::Point(88, 270);
			this->radioButton2->Name = L"radioButton2";
			this->radioButton2->Size = System::Drawing::Size(28, 17);
			this->radioButton2->TabIndex = 2;
			this->radioButton2->TabStop = true;
			this->radioButton2->Text = L" ";
			this->radioButton2->UseVisualStyleBackColor = true;
			this->radioButton2->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton2_CheckedChanged);
			// 
			// radioButton3
			// 
			this->radioButton3->AutoSize = true;
			this->radioButton3->Location = System::Drawing::Point(88, 320);
			this->radioButton3->Name = L"radioButton3";
			this->radioButton3->Size = System::Drawing::Size(14, 13);
			this->radioButton3->TabIndex = 3;
			this->radioButton3->TabStop = true;
			this->radioButton3->UseVisualStyleBackColor = true;
			this->radioButton3->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton3_CheckedChanged);
			// 
			// radioButton4
			// 
			this->radioButton4->AutoSize = true;
			this->radioButton4->Location = System::Drawing::Point(88, 370);
			this->radioButton4->Name = L"radioButton4";
			this->radioButton4->Size = System::Drawing::Size(14, 13);
			this->radioButton4->TabIndex = 4;
			this->radioButton4->TabStop = true;
			this->radioButton4->UseVisualStyleBackColor = true;
			this->radioButton4->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton4_CheckedChanged);
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(85, 57);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(0, 13);
			this->label1->TabIndex = 5;
			this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
			// 
			// File
			// 
			this->File->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->helpToolStripMenuItem, 
				this->exitToolStripMenuItem});
			this->File->Name = L"File";
			this->File->Size = System::Drawing::Size(125, 48);
			this->File->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::File_Opening);
			// 
			// helpToolStripMenuItem
			// 
			this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
			this->helpToolStripMenuItem->ShortcutKeys = System::Windows::Forms::Keys::F12;
			this->helpToolStripMenuItem->Size = System::Drawing::Size(124, 22);
			this->helpToolStripMenuItem->Text = L"Help";
			// 
			// exitToolStripMenuItem
			// 
			this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";
			this->exitToolStripMenuItem->Size = System::Drawing::Size(124, 22);
			this->exitToolStripMenuItem->Text = L"Exit";
			// 
			// go
			// 
			this->go->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->go->Location = System::Drawing::Point(264, 399);
			this->go->Name = L"go";
			this->go->Size = System::Drawing::Size(134, 41);
			this->go->TabIndex = 7;
			this->go->Text = L"Go";
			this->go->UseVisualStyleBackColor = true;
			this->go->Click += gcnew System::EventHandler(this, &Form1::go_Click);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(643, 451);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->go);
			this->Controls->Add(this->radioButton4);
			this->Controls->Add(this->radioButton3);
			this->Controls->Add(this->exit);
			this->Controls->Add(this->radioButton2);
			this->Controls->Add(this->radioButton1);
			this->Name = L"Form1";
			this->Text = L"Mikhail Gorbachev Trivia Quiz Made By Ricky";
			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
			this->File->ResumeLayout(false);
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {

		 }
private: System::Void radioButton1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 radiobutton1 = "yes"
		 }
private: System::Void radioButton2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 radiobutton2 = "yes"
		 }
private: System::Void radioButton3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 radiobutton3 = "yes"
		 }
private: System::Void radioButton4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
			 radiobutton4 = "yes"
		 }
private: System::Void File_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
		 }
private: System::Void exit_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->Close();
		 }
private: System::Void go_Click(System::Object^  sender, System::EventArgs^  e) {
			 answers = answers + 1;
			 if(question == 1);{
				 this->label1->Text = "What was Mikhail Gorbachev known mostly for being what?";
			 this->radioButton1->Text = "The founder of Friendly's";
			 this->radioButton2->Text = "The inventor of Roomba";
			 this->radioButton3->Text = "The leader of the Solviet Union";
			 this->radioButton4->Text = "The inventor of the desiel engine";// spelling
				if(radiobutton3 == "yes");{
					this->label1->Text = "Congratulations you have "; ranswers; " out of "; answers;
					ranswers = ranswers + 1;
				}
				else;{
					this->label1->Text = "The correct answer was the leader of the Solviet Union";
				}	
		 }
};
}

  #2  
Old 09-Nov-2008, 09:58
RenegadeAO RenegadeAO is offline
New Member
 
Join Date: Oct 2008
Location: Pensacola FL
Posts: 22
RenegadeAO is on a distinguished road

Re: trivia quiz game


Hey, I'd like to help you but you need to be a bit more specific. Whats the problem with your code? Whats not working? What error message is your compiler giving you? lol We need somewhere to begin.
  #3  
Old 09-Nov-2008, 10:09
RenegadeAO RenegadeAO is offline
New Member
 
Join Date: Oct 2008
Location: Pensacola FL
Posts: 22
RenegadeAO is on a distinguished road

Re: trivia quiz game


Though I dont know where you are having problems at I do see some errors with your code
CPP / C++ / C Code:
if(radiobutton3 == "yes");{

First off radiobutton3 isnt very discriptive. 2nd this shouldn't work. If you want to know if radiobutton3 is selected the code should look like this.
CPP / C++ / C Code:
if(radiobutton3->checked == true) {
//Your code here
}

that semicolon after your if statement should cause an error by itself. Also your trying to compare an object to a string here which you can't do in C++. You need to tell it what part of the object you want to compare. You can compare a bunch of things in the object, you can compare the text, in the radiobuttons case you can compare the state and so on.

Also dont try using global variables, try using local variables in your method handlers. And you dont have to tell your radio buttons that they are true, MSVS C++ will do it automatically for you, also the code in there is wrong so its not going to work.

What programming languages do you know?
  #4  
Old 09-Nov-2008, 16:25
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: trivia quiz game


ok i changed some stuff but it still comes up with some 3 errors when i build this is probably a really simple thing but there all for this line

CPP / C++ / C Code:
this->label1->Text = "Congratulations you have " ranswers " out of " answers;

the error codes are:

1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2146: syntax error : missing ';' before identifier 'ranswers'
1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2143: syntax error : missing ';' before 'string'
1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2146: syntax error : missing ';' before identifier 'answers'
  #5  
Old 09-Nov-2008, 16:32
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: trivia quiz game


also for some reason this line isnt working for some reason
CPP / C++ / C Code:
this->label1->Text = "What was Mikhail Gorbachev known mostly for being what?";

nevermind i think i fixed it
  #6  
Old 09-Nov-2008, 17:24
RenegadeAO RenegadeAO is offline
New Member
 
Join Date: Oct 2008
Location: Pensacola FL
Posts: 22
RenegadeAO is on a distinguished road

Re: trivia quiz game


Quote:
Originally Posted by helpmeplz
ok i changed some stuff but it still comes up with some 3 errors when i build this is probably a really simple thing but there all for this line

CPP / C++ / C Code:
this->label1->Text = "Congratulations you have " ranswers " out of " answers;

the error codes are:

1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2146: syntax error : missing ';' before identifier 'ranswers'
1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2143: syntax error : missing ';' before 'string'
1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(236) : error C2146: syntax error : missing ';' before identifier 'answers'

Ok not sure if this will work the way it is. Normally You need to use the + operator to append text. Try this and tell me if it works? If it does great if not then it will be a long annoying fix...proally
CPP / C++ / C Code:
label1->Text = "Congratulations you have " + ranswers + " out of " + answers;

if that doesn't work its because its not registering ranswers and answers as a string. In this case you may need:
CPP / C++ / C Code:
label1->Text = "Congratulations you have " + ranswers.toString() + " out of " + answers.toString();

a side note you dont need to use the this keyword when changing the properties of your object... but it should work either way.
  #7  
Old 09-Nov-2008, 17:39
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: trivia quiz game


thanks alot it work
  #8  
Old 09-Nov-2008, 17:50
RenegadeAO RenegadeAO is offline
New Member
 
Join Date: Oct 2008
Location: Pensacola FL
Posts: 22
RenegadeAO is on a distinguished road

Re: trivia quiz game


lol np ^_^, Visual C++ can be annoying when you are starting out.
  #9  
Old 17-Nov-2008, 19:56
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: Trivia quiz game


ok now i have a problem with it i want it to show how many questions you get right but for some reason it wont add one to the ranswers varaible for most questions except for some random ones i check and there is nothing diffrent from them

CPP / C++ / C Code:
#pragma once


namespace project {
	int question, answers, ranswers;


	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  exit;
	protected: 
	private: System::Windows::Forms::RadioButton^  radioButton1;
	private: System::Windows::Forms::RadioButton^  radioButton2;
	private: System::Windows::Forms::RadioButton^  radioButton3;
	private: System::Windows::Forms::RadioButton^  radioButton4;
	private: System::Windows::Forms::Label^  label1;



	private: System::Windows::Forms::Button^  go;
	private: System::Windows::Forms::Label^  label2;

	private: System::ComponentModel::IContainer^  components;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>


#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->exit = (gcnew System::Windows::Forms::Button());
			this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
			this->radioButton4 = (gcnew System::Windows::Forms::RadioButton());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->go = (gcnew System::Windows::Forms::Button());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->SuspendLayout();
			// 
			// exit
			// 
			this->exit->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->exit->Location = System::Drawing::Point(497, 399);
			this->exit->Name = L"exit";
			this->exit->Size = System::Drawing::Size(134, 41);
			this->exit->TabIndex = 0;
			this->exit->Text = L"Exit";
			this->exit->UseVisualStyleBackColor = true;
			this->exit->Click += gcnew System::EventHandler(this, &Form1::exit_Click);
			// 
			// radioButton1
			// 
			this->radioButton1->AutoSize = true;
			this->radioButton1->Location = System::Drawing::Point(88, 220);
			this->radioButton1->Name = L"radioButton1";
			this->radioButton1->Size = System::Drawing::Size(14, 13);
			this->radioButton1->TabIndex = 1;
			this->radioButton1->TabStop = true;
			this->radioButton1->UseVisualStyleBackColor = true;
			this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);
			// 
			// radioButton2
			// 
			this->radioButton2->AutoSize = true;
			this->radioButton2->Location = System::Drawing::Point(88, 270);
			this->radioButton2->Name = L"radioButton2";
			this->radioButton2->Size = System::Drawing::Size(28, 17);
			this->radioButton2->TabIndex = 2;
			this->radioButton2->TabStop = true;
			this->radioButton2->Text = L" ";
			this->radioButton2->UseVisualStyleBackColor = true;
			this->radioButton2->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton2_CheckedChanged);
			// 
			// radioButton3
			// 
			this->radioButton3->AutoSize = true;
			this->radioButton3->Location = System::Drawing::Point(88, 320);
			this->radioButton3->Name = L"radioButton3";
			this->radioButton3->Size = System::Drawing::Size(14, 13);
			this->radioButton3->TabIndex = 3;
			this->radioButton3->TabStop = true;
			this->radioButton3->UseVisualStyleBackColor = true;
			this->radioButton3->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton3_CheckedChanged);
			// 
			// radioButton4
			// 
			this->radioButton4->AutoSize = true;
			this->radioButton4->Location = System::Drawing::Point(88, 370);
			this->radioButton4->Name = L"radioButton4";
			this->radioButton4->Size = System::Drawing::Size(14, 13);
			this->radioButton4->TabIndex = 4;
			this->radioButton4->TabStop = true;
			this->radioButton4->UseVisualStyleBackColor = true;
			this->radioButton4->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton4_CheckedChanged);
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label1->Location = System::Drawing::Point(85, 57);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(128, 18);
			this->label1->TabIndex = 5;
			this->label1->Text = L"Press Go to begin";
			this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click);
			// 
			// go
			// 
			this->go->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->go->Location = System::Drawing::Point(264, 399);
			this->go->Name = L"go";
			this->go->Size = System::Drawing::Size(134, 41);
			this->go->TabIndex = 7;
			this->go->Text = L"Go";
			this->go->UseVisualStyleBackColor = true;
			this->go->Click += gcnew System::EventHandler(this, &Form1::go_Click);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(486, 119);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(0, 13);
			this->label2->TabIndex = 8;
			this->label2->Click += gcnew System::EventHandler(this, &Form1::label2_Click);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(643, 451);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->go);
			this->Controls->Add(this->radioButton4);
			this->Controls->Add(this->radioButton3);
			this->Controls->Add(this->exit);
			this->Controls->Add(this->radioButton2);
			this->Controls->Add(this->radioButton1);
			this->Name = L"Form1";
			this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {

		 }
private: System::Void radioButton1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void radioButton2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void radioButton3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void radioButton4_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void File_Opening(System::Object^  sender, System::ComponentModel::CancelEventArgs^  e) {
		 }
private: System::Void exit_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->Close();
		 }
		 
private: System::Void go_Click(System::Object^  sender, System::EventArgs^  e) {
			 answers = answers + 1;
			 
			 if(answers == 1){
			 this->label1->Text = "Mikhail Gorbachev was mostly known for being what?";
			 this->radioButton1->Text = "The Founder of Friendly's";
			 this->radioButton2->Text = "The inventor of Roomba";
			 this->radioButton3->Text = "The leader of the Soviet Union";
			 this->radioButton4->Text = "The inventor of the diesel engine";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }

		 
			 if(answers == 2){
			 this->label1->Text = "How did Mikhail Gorbachev win a Nobel Peace Prize?";
			 this->radioButton1->Text = "Ending Cold War tensions";
			 this->radioButton2->Text = "Freeing East Germany";
			 this->radioButton3->Text = "Freeing West Germany";
			 this->radioButton4->Text = "Reducing nuclear weapon stockpiles";// spelling
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 3){
			 this->label1->Text = "Who said this quote to him 'Mr. Gorbachev tear down that wall'?";
			 this->radioButton1->Text = "George W. Bush";
			 this->radioButton2->Text = "Ronald Reagan";
			 this->radioButton3->Text = "Barack Obama";
			 this->radioButton4->Text = "George H. Bush";// spelling
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton2->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 4){
			 this->label1->Text = "What was Mikhail's middle name?";
			 this->radioButton1->Text = "Illarionovich";
			 this->radioButton2->Text = "Vasil'evich";
			 this->radioButton3->Text = "Gorbachev";
			 this->radioButton4->Text = "Sergeyevich";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 5){
			 this->label1->Text = "What was Mikhail's first job?";
			 this->radioButton1->Text = "Fast food worker";
			 this->radioButton2->Text = "Farmer";
			 this->radioButton3->Text = "Musician";//spelling
			 this->radioButton4->Text = "Coal miner";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton2->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 6){
			 this->label1->Text = "When did Mikhail die?";
			 this->radioButton1->Text = "1990";
			 this->radioButton2->Text = "1910";
			 this->radioButton3->Text = "1930";
			 this->radioButton4->Text = "none of the above he is still alive";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 7){
			 this->label1->Text = "What university did he go to?";
			 this->radioButton1->Text = "Moscow State University";
			 this->radioButton2->Text = "Yale";
			 this->radioButton3->Text = "Uconn";
			 this->radioButton4->Text = "Mendeleyev University of Chemical Technology";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 8){
			 this->label1->Text = "When did he become the leader of the Soviet Union?";
			 this->radioButton1->Text = "1990";
			 this->radioButton2->Text = "2003";
			 this->radioButton3->Text = "1560";
			 this->radioButton4->Text = "1991";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 9){
			 this->label1->Text = "How long did he rule?";
			 this->radioButton1->Text = "9 years";
			 this->radioButton2->Text = "5 years";
			 this->radioButton3->Text = "6 years";
			 this->radioButton4->Text = "12 years";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 10){
			 this->label1->Text = "Gorbachev appeared in a television ad for what company?";
			 this->radioButton1->Text = "McDonalds";
			 this->radioButton2->Text = "Taco Bell";
			 this->radioButton3->Text = "Pizza Hut";
			 this->radioButton4->Text = "Olive Garden";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 11){
			 this->label1->Text = "What U.S. national disaster did mikhail visit?";
			 this->radioButton1->Text = "Hurricane Katrina";
			 this->radioButton2->Text = "Hurricane rita";
			 this->radioButton3->Text = "1993 Mississippi river flooding";
			 this->radioButton4->Text = "Chernobyl";
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 12){
			 this->label1->Text = "What is his religon?";
			 this->radioButton1->Text = "Muslim";
			 this->radioButton2->Text = "Jewish";
			 this->radioButton3->Text = "Catholic";
			 this->radioButton4->Text = "Atheist";//spelling
			 			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 13){
			 this->label1->Text = "When was Mikhail Gorbachev born?";
			 this->radioButton1->Text = "1931";
			 this->radioButton2->Text = "1980";
			 this->radioButton3->Text = "1923";
			 this->radioButton4->Text = "1937";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 14){
			 this->label1->Text = "When did Mikhail Gorbachev's wife die?";
			 this->radioButton1->Text = "1946";
			 this->radioButton2->Text = "1999";
			 this->radioButton3->Text = "1987";
			 this->radioButton4->Text = "1955";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton2->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 15){
			 this->label1->Text = "What town was Mikhail Gorbachev born?";
			 this->radioButton1->Text = "Moscow";
			 this->radioButton2->Text = "Alagir";
			 this->radioButton3->Text = "Rostiv";
			 this->radioButton4->Text = "Privolnoye";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 16){
			 this->label1->Text = "Why was the Gorbachev Foundation created?";
			 this->radioButton1->Text = "To provide shelter for the homeless";
			 this->radioButton2->Text = "Child abuse prevention";
			 this->radioButton3->Text = "For children with cancer";
			 this->radioButton4->Text = "To establish national standards for education";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }			 
			 if(answers == 17){
			 this->label1->Text = "Mikhail Gorbachev grew up under the leadership of which leader?";
			 this->radioButton1->Text = "Adolph Hitler";
			 this->radioButton2->Text = "Winston Churchill";
			 this->radioButton3->Text = "Benito Mussolini";
			 this->radioButton4->Text = "Joseph Stalin";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1; 
							}
			 }
			 if(answers == 18){
			 this->label1->Text = "What did Mikhail study in college?";
			 this->radioButton1->Text = "Law";
			 this->radioButton2->Text = "Medicine";
			 this->radioButton3->Text = "Music";
			 this->radioButton4->Text = "physics";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 19){
			 this->label1->Text = "In addition to winning the Nobel Peace Prize what other honor(s) did he receive?";
			 this->radioButton1->Text = "Albert Einstein Award";
			 this->radioButton2->Text = "Martin Luther King Award";
			 this->radioButton3->Text = "Indira Gandhi Award";
			 this->radioButton4->Text = "All of the above";
			  this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 }
			 if(answers == 20){
			 this->label1->Text = "What is Perestroika?";
			 this->radioButton1->Text = "A computer game";
			 this->radioButton2->Text = "A play ";
			 this->radioButton3->Text = "Restructuring of the Soviet economy";
			 this->radioButton4->Text = "A Russian card game";
			 this->label2->Text = "you got "+ ranswers +" right so far";
			 				if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;

							}
			 }
			 if(answers == 21){
				 this->label1->Text = "Congratulations you got "+ ranswers +" out of 20";
			 }
		 }
				
				
				private: System::Void label2_Click(System::Object^  sender, System::EventArgs^  e) {
			;			 }
}
		 ;}



  #10  
Old 19-Nov-2008, 04:44
LuciWiz's Avatar
LuciWiz LuciWiz is offline
Moderator
 
Join Date: Jul 2004
Location: Cluj-Napoca (Romania)
Posts: 1,031
LuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the roughLuciWiz is a jewel in the rough

Re: Trivia quiz game


Moved to the .NET forum.
__________________
Please read these Guidelines before posting on the forum

"A person who never made a mistake never tried anything new."
Einstein
 
 

Recent GIDBlogVista ?Widgets? on Windows XP by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a simple "dragon" game. ddaigle C++ Forum 13 04-Dec-2007 06:06
Tips for game troubleshooting pcxgamer Computer Software Forum - Games 0 02-Jan-2004 05:27

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 14:58.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.