I'm trying to create a win forms application where a user can fill in events that will happen each day of the year. The textboxes will be generated by a script. The textbox needs to be given the ID of the day and month so it can be found when it is saved. But the problem is the form application is blank when run. Help a begginer out please.
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
DateTime Current_Year = new DateTime(DateTime.Now.Year, 1, 1);
public TextBox[] TxBxArray = new TextBox[366];
public Form1()
{
InitializeComponent();
int year_length = 365;
if (DateTime.IsLeapYear(DateTime.Now.Year)) year_length = 366;
for (int i = 0; i < year_length; i++)
{
TxBxArray[i] = new TextBox();
TxBxArray[i].Name = Current_Year.ToString("dd/MM");
TxBxArray[i].Location = new System.Drawing.Point(20, 30 + 40 * i);
TxBxArray[i].Size = new System.Drawing.Size(184, 20);
Current_Year.AddDays(1);
}
}
}
}