My problem at the moment is that, when I take the text box text and convert to a string, then set the name of the new form to that string, it does nothing. the code compiles and runs without error, but does nothing. I've trawled through the MSDN documentation, however, none of it seems to handle anything remotely like this that I can find - only converting things like integers into strings, etc. If I try to directly input the text box text anywhere it throws errors that it can't be implicitly converted into a string.
Anyway, here's the code:
LeagueView StartNewLeague = new LeagueView(); string NameString; //NewLeagueName.Text.ToString(); //This line seems to make no difference, moved down one. //this converts newleaguename.text into a string and makes NameString = that text (i.e. the name the user has input) NameString = NewLeagueName.Text.ToString(); //this sets the name of the new league to the name the user has input StartNewLeague.Name = NameString; //only it actually doesn't, as it does nothing whatsoever. StartNewLeague.Show();
Does anyone have any ideas about how to set the name of the new form window (or alternatively to set the name of a label within the new form) ?