《Graphics》.DrawLine(《Pen》,
横1, 縦1, 横2, 縦2 );
《Graphics》.DrawLine(《Pen》,
《Point》,《Point》);
《Graphics》.DrawLines(《Pen》,
《Point配列》 );
《Graphics》.DrawRectangle(《Pen》, 横位置, 縦位置, 横幅, 高さ );
《Graphics》.DrawRectangle(《Pen》,《Rectangle》);
《Graphics》.FillRectangle(《Pen》, 横位置, 縦位置, 横幅, 高さ );
《Graphics》.FillRectangle(《Pen》,《Rectangle》);
《Graphics》.DrawEllipse(《Pen》, 横位置, 縦位置, 横幅, 高さ );
《Graphics》.DrawEllipse(《Pen》,《Rectangle》);
《Graphics》.FillEllipse(《Pen》, 横位置, 縦位置, 横幅, 高さ );
《Graphics》.FillEllipse(《Pen》,《Rectangle》);
《Graphics》.DrawArc(《Pen》,《Rectangle》, 開始角度 , 終了角度 );
《Graphics》.DrawPie(《Pen》,《Rectangle》, 開始角度 , 終了角度 );
《Graphics》.FillPie(《Pen》,《Rectangle》, 開始角度 , 終了角度 );
《Graphics》.DrawPolygon(《Pen》,《Point配列》);
《Graphics》.FillPolygon(《Pen》,《Point配列》);
《Graphics》.DrawCurve(《Pen》,《Point配列》);
《Graphics》.DrawClosedCurve(《Pen》,《Point配列》);
《Graphics》.FillClosedCurve(《Pen》,《Point配列》);
《Graphics》.DrawBezier(《Pen》,《Point》,《Point》,《Point》,《Point》);
《Graphics》.DrawBeziers(《Pen》,《Point配列》);
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
using System;
using System.Drawing;
using System.Windows.Forms;
namespace MyFrmApp
{
    public class MyForm : Form
    {
            
        public MyForm()
        {
            this.Width = 300;
            this.Height = 200;
            this.Paint += myframe_paint;
        }
            
        private void myframe_paint(object sender, PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            Pen p = new Pen(Color.Red);
            Brush b = new SolidBrush(Color.Blue);
            g.FillRectangle(b,50,50,50,50);
            g.DrawEllipse(p,75,75,50,50);
        }
    }
}
| << 前へ | 次へ >> |