Quantcast
Channel: C#タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9551

cscの作法 その9

$
0
0

概要

cscの作法、調べてみた。
練習問題やってみた。

練習問題

日の丸を描け。

写真

image.png

サンプルコード

using System;
using System.Windows.Forms;
using System.Drawing;

class form1: Form {
    form1() {
        Text = "maru";
        ClientSize = new Size(300, 300);
    }
    protected override void OnPaint(PaintEventArgs e) {
        Graphics g = e.Graphics;
        Brush red = new SolidBrush(Color.Red);
        g.FillEllipse(red, 30, 30, 230, 230);
        base.OnPaint(e);
    }
    [STAThread]
    public static void Main() {
        Application.Run(new form1());
    }
}


以上。


Viewing all articles
Browse latest Browse all 9551

Trending Articles