using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace form_sample
{
class Program
{
// アプリケーションのエントリポイント
[STAThread]
static void Main(string[] args)
{
Form form = new Form1();
Application.Run(form);
}
}
}
ソース:From1.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace form_sample
{
class Form1 : Form
{
// コンストラクタ
public Form1()
{
this.Load += Form1_Load;
}
// Loadイベント
private void Form1_Load(object sender, EventArgs e)
{
// タイトルをセット
this.Text = "form_sample";
}
}
}
コメント