using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace BuildField { public partial class Form1 : Form { private TextBox textBox1; public Form1() { InitializeComponent(); controlInit(); } private void controlInit() { // インスタンス作成 textBox1 = new TextBox(); // フォント設定 textBox1.Font = new Font("MS UI Gothic", 12F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(128))); // 位置設定 textBox1.Location = new Point(208, 42); // 名称設定 textBox1.Name = "textBox1"; // 幅と高さの設定 textBox1.Size = new Size(208, 23); // TAB の順序 textBox1.TabIndex = 0; Controls.Add(this.textBox1); } } }