View Single Post
Old Feb 24th, 2005, 1:10 PM   #1
gencor45
Newbie
 
Join Date: Feb 2005
Posts: 20
Rep Power: 0 gencor45 is on a distinguished road
Exclamation using an array with a inputbox class

I created a class inputbox that displays a inputbox that you can enter a number between 3 and 15. These are the dimesions for a tic tac toe game Im coding. For example, if the user enters a 7, you get a 7by7 game. I dont understand how to use the integer entered in my inputbox and set it to my button array.

Heres my code so far:

/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void menuItem2_Click(object sender, System.EventArgs e)
		{
			//exits the program
			this.Close();
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
			Button[] myArray=new Button[?];
		}

I dont understand what to put to initialize the array. How do I tie my inputbox integer into the array I have created? Any help would be appreciated.
gencor45 is offline   Reply With Quote