1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| if(imModeDessin == 4)
{
if ( e.Button == MouseButtons.Left )
{
Graphics g = Graphics.FromImage( imBitmap );
g.SmoothingMode = SmoothingMode.AntiAlias;
Pen pen = new Pen(imPenColor,1);
AutoScaleBaseSize = new System.Drawing.Size(5, 13);
ClientSize = new System.Drawing.Size(292, 266);
TextBox tb = new TextBox();
// textBox1
//
tb.Location = new System.Drawing.Point(e.X, e.Y);
tb.Name = "textBox1";
tb.TabIndex = 1;
tb.Text = "textBox1";
tb.ReadOnly = false;
tb.Enabled = true;
//
// VueTest
//
AutoScaleBaseSize = new System.Drawing.Size(5, 13);
ClientSize = new System.Drawing.Size(292, 266);
Controls.Add(tb);
SolidBrush drawBrush = new SolidBrush(Color.Black);
g.DrawString(tb.Text,new Font("Arial",15),drawBrush,new Rectangle(imStartPoint.X, imStartPoint.Y,e.X, e.Y));
//imGraphics.DrawLine(pen,imStartPoint,new Point(e.X,e.Y));
imImagePictureBox.Image = imBitmap;
}
} |
Partager