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 17-Nov-2008, 16:08
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Mikhail Gorbachev trivia quiz


ok i have to finish this school project by wednesday but there are 2 problems the number at the end is never right (where it tells how many answers you got right) and then how can i clear the radiobuttons after each questions here it the code

Im only 13 so go easy on me

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


namespace project {
	int question, ranswers, answers;



	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";//spelling
			 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 year";
			 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) {
			;			 }
}
		 ;}

  #2  
Old 17-Nov-2008, 16:14
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: mikhail gorbachev trivia quiz


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
  #3  
Old 17-Nov-2008, 19:55
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: mikhail gorbachev trivia quiz


1. The correct count...
For each radiobutton check, you are checking the response one step ahead of having a selection. For example, in this condition:
CPP / C++ / C Code:
	 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) { // NOT set at this point
				ranswers = ranswers + 1;
			}
	 }
(see the comment) When the Go button is clicked, there is no radiobutton choice at the start, so that will always be false. The way you have the logic organized, each radiobutton check needs to be moved into the beginning of the next answer. Follow what I mean? (I'll put a small example below) Basically, the first answer will not have any condition to check a radiobutton, but at the beginning of answer 2, check answer 1 -- at the beginning of answer 3, check answer 2, and so on.

2. clear the radiobuttons...
One possible way is to create another function (within the Form's class) that will check all the radiobuttons, and set false for the one found true, maybe something like this:
CPP / C++ / C Code:
private: System::Void ClearAnswer()
 {
	if(radioButton1->Checked == true)
	{
		radioButton1->Checked = false;
	}
	else if(radioButton2->Checked == true)
	{
		radioButton2->Checked = false;
	}
	else if(radioButton3->Checked == true)
	{
		radioButton3->Checked = false;
	}
	else if(radioButton4->Checked == true)
	{
		radioButton4->Checked = false;
	}
 }
Then immediately after checking the previous response, and before setting up the next question set, call this function to clear any radio button.

SO, having these things in place, the code might look something like this: (only a minor example to what you've started)
CPP / C++ / C Code:
 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(answers == 2){
 	if(radioButton3->Checked == true) { // check the previous guess.
		ranswers = ranswers + 1;
	}
	ClearAnswer();				// clear the choice.
	 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(answers == 3){
	if(radioButton1->Checked == true) {
		ranswers = ranswers + 1;
	}
	ClearAnswer();
   ///  Get the idea? continue from here.
HTH. Any question(s) about any of this, post another reply.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #4  
Old 17-Nov-2008, 19:57
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: mikhail gorbachev trivia quiz


thanks so much
  #5  
Old 17-Nov-2008, 20:24
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: mikhail gorbachev trivia quiz


now i get 52 errors when compiling after deleting label2 and the stuff related to it
the errors all say things like this

1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(277) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body

and

1>c:\users\ricky\desktop\stuff\projects\project\pr oject\Form1.h(289) : error C2059: syntax error : 'if'

CPP / C++ / C Code:
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";
			 
			 			
			 }

		 
			 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
			 			 
						  if(radioButton3->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
			 			
						  if(radioButton1->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";
		
							if(radioButton2->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";
			 			 
						  if(radioButton4->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";

						  if(radioButton2->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";
		
						  if(radioButton4->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";
			 		
						  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";
			 			 
			 				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";
			 			 
						  if(radioButton1->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";
			 			  
						  	if(radioButton3->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
			 			 
						  if(radioButton1->Checked == true) {
					ranswers = ranswers + 1;
							}
			 				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";
	
			  if(radioButton4->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";
			
			  if(radioButton1->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";
	
			  if(radioButton2->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";

			  if(radioButton4->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";
			  
			  if(radioButton3->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";
			  
			  if(radioButton4->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";
			
			  if(radioButton1->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";
			 
			 if(radioButton4->Checked == true) {
					ranswers = ranswers + 1;
							}
			 				
			 }
			 if(answers == 21){
				 if(radioButton3->Checked == true) {
					ranswers = ranswers + 1;

							}
				 this->label1->Text = "Congratulations you got "+ ranswers +" out of 20";
			 }
		 }
				
				

}
		 ;}

  #6  
Old 18-Nov-2008, 04:39
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: mikhail gorbachev trivia quiz


In the (answers == 2) block of code, it appears there is an extra lingering }. (after the radiobutton check) Mismatching these will typically cause strange errors.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #7  
Old 18-Nov-2008, 06:11
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,233
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: mikhail gorbachev trivia quiz


Note that within visual studio, using ctrl+] can be used to match pairings of {}, [], and ().
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
Last edited by TurboPT : 18-Nov-2008 at 07:29.
  #8  
Old 18-Nov-2008, 08:06
helpmeplz helpmeplz is offline
New Member
 
Join Date: Jul 2008
Posts: 22
helpmeplz is an unknown quantity at this point

Re: Mikhail Gorbachev trivia quiz


is there a way to add like a video that loops and plays fireworks or somthing over and over again easily if not i dont really care
 
 

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
Trivia quiz game helpmeplz .NET Forum 9 19-Nov-2008 04:44

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

All times are GMT -6. The time now is 02:18.


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