C# - please help me

bfirst

Client
Регистрация
05.11.2013
Сообщения
56
Благодарностей
0
Баллы
6
Hi

I would be very happy if someone will help me with my simple c# code.
I am trying to have an option to input some data manually during ZP Project run. (I have to fill sms code input) during registration process. I have created this code, but it doesn't send value of input box to my variable. Where is the problem?

Код:
System.Windows.Forms.Form F = new System.Windows.Forms.Form();
F.Text = "test form";
F.Width = 400;
F.Height = 200;
System.Windows.Forms.TextBox textb = new System.Windows.Forms.TextBox ();
textb.Location = new System.Drawing.Point (50,50);
textb.Width = 200;
F.Controls.Add (textb);
System.Windows.Forms.Button button = new System.Windows.Forms.Button ();
button.Text = "send data";
button.Location = new System.Drawing.Point (100,90);
button.Size = new System.Drawing.Size (90, 40);

button.Click += delegate (object sender, System.EventArgs e)
{
F.Dispose ();
};
F.Controls.Add (button);
F.ShowDialog();
return textb.Text;
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 184
Баллы
113

bfirst

Client
Регистрация
05.11.2013
Сообщения
56
Благодарностей
0
Баллы
6
It is god Idea. Thanks but I also need to save value which I've written to table.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Here...
 

Вложения

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)