※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MyFrmApp
{
public class MyForm : Form
{
private Label label;
private TextBox box;
private Button btn;
public MyForm()
{
this.Width = 300;
this.Height = 200;
setupControls();
}
public void setupControls()
{
label = new Label();
label.Text = "type text:";
label.Font = new Font("Geneva",12,FontStyle.Regular);
label.Height = 30;
label.Width = 300;
this.Controls.Add(label);
box = new TextBox();
box.Width = 225;
box.Top = 50;
box.Left = 25;
this.Controls.Add(box);
btn = new Button();
btn.Text = "click";
btn.Height = 30;
btn.Width = 100;
btn.Top = 100;
btn.Left = 100;
btn.Click += btn_Click;
this.Controls.Add(btn);
}
private void btn_Click(object sender, System.EventArgs e)
{
string str = box.Text;
label.Text = "you write'" + str + "'.";
}
}
}
| << 前へ | 次へ >> |