コード例 #1
0
ファイル: Form1.cs プロジェクト: AlexSikilinda/Risovakimus
 public Form1()
 {
     InitializeComponent();
     p = new Picture(g);
     Paint += new PaintEventHandler(OnPaint);
     panel = new PaintPanel();
     panel.Location = new System.Drawing.Point(96, 41);
     panel.Size = new System.Drawing.Size(631, 510);
     panel.Parent = this;
     panel.BackColor = Color.White;
     g = panel.CreateGraphics();
     panel.MouseDown += panel1_MouseDown_1;
     panel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
     p.g = g;
     p.gcontrol = panel;
     panel.Resize += Form1_Resize;
     tcolor = Color.Black;
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: AndreyRudoy/CsharpCourseWork
 public Form1()
 {
     InitializeComponent();
     p                = new Picture(g);
     Paint           += new PaintEventHandler(OnPaint);
     panel            = new PaintPanel();
     panel.Location   = new System.Drawing.Point(96, 41);
     panel.Size       = new System.Drawing.Size(631, 510);
     panel.Parent     = this;
     panel.BackColor  = Color.White;
     g                = panel.CreateGraphics();
     panel.MouseDown += panel1_MouseDown_1;
     panel.Anchor     = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
     p.g              = g;
     p.gcontrol       = panel;
     panel.Resize    += Form1_Resize;
     tcolor           = Color.Black;
 }