public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void Form1_Load(object sender, EventArgs e)
{
//this.BackgroundImage = Properties.Resources.sds;
AuthGUI();
}
public void AuthGUI()
{
label1 = new Label();
label1.Location = new Point(160, 74);
label1.Text = "СРИНДЕР";
label1.BackColor = TransparencyKey;
this.Controls.Add(label1);
bt1 = new Button();
bt1.Name = "button1";
bt1.Text = "Регистрация";
bt1.Width = 129;
bt1.Height = 42;
bt1.Location = new Point(123, 159);
bt1.Click += this.bt1_reg;
bt2 = new Button();
bt2.Name = "button2";
bt2.Text = "Вход";
bt2.Width = 129;
bt2.Height = 44;
bt2.Location = new Point(123, 244);
//bt2.Click += this.bt_Click;
this.Controls.Add(bt1);
this.Controls.Add(bt2);
}
public void bt1_reg(object sender,EventArgs e)
{
bt1.Hide();
bt2.Hide();
label1.Hide();
regGUIload();
}
public void regGUIload()
{
labelreg1 = new Label();
labelreg2 = new Label();
labelreg3 = new Label();
labelreg1.Location = new Point(171, 62);
labelreg2.Location = new Point(171, 124);
labelreg3.Location = new Point(171, 178);
labelreg1.Text = "Логин";
labelreg2.Text = "Пароль";
labelreg3.Text = "E-mail";
labelreg1.BackColor = System.Drawing.Color.Transparent;
labelreg2.BackColor = System.Drawing.Color.Transparent;
labelreg3.BackColor = System.Drawing.Color.Transparent;
textbox1 = new TextBox();
textbox2 = new TextBox();
textbox3 = new TextBox();
textbox1.MaxLength = 16;
textbox2.MaxLength = 24;
textbox3.MaxLength = 36;
textbox1.BackColor = Color.White;
textbox1.Location = new Point(135, 89);
textbox2.Location = new Point(135, 140);
textbox3.Location = new Point(135, 194);
regbutton = new Button();
regbutton.Text = "Регистрация";
regbutton.Width = 144;
regbutton.Height = 44;
regbutton.Location = new Point(126, 288);
this.Controls.Add(labelreg1);
this.Controls.Add(labelreg2);
this.Controls.Add(labelreg3);
this.Controls.Add(textbox1);
this.Controls.Add(textbox2);
this.Controls.Add(textbox3);
this.Controls.Add(regbutton);
}
}
Создавал панель регистрации, но у меня почему то прозрачные текстбоксы. В чем может быть проблема?