如题

解决方案 »

  1.   

    style="TEXT-DECORATION: line-through"
      

  2.   

    忘了说是在WINFROM上用GDI+画的.
      

  3.   

    private void Form1_Paint(object sender, PaintEventArgs e)
            {
                Graphics g = e.Graphics;
                g.FillRectangle(Brushes.White, this.ClientRectangle);            PointF p1 = new PointF(20, 100);
                PointF p2 = new PointF(200, 100);
                g.DrawLine(Pens.Black, p1, p2);
                g.DrawString("adfgsg", this.Font, Brushes.Black, p1.X + (p2.X - p1.X) / 2, p1.Y + (p2.Y - p1.Y) / 2 - this.Font.GetHeight());        }
      

  4.   

    private void Form2_Paint(object sender, PaintEventArgs e)
    {
    //Graphics g = pe.Graphics;
    System.Drawing.Graphics formGraphics = this.CreateGraphics();
    string drawString = "Sample Text";
    System.Drawing.Font drawFont = new System.Drawing.Font("Arial", 16,FontStyle.Strikeout);
    System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
    float x = 150.0F;
    float y = 50.0F;
    System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat();
    formGraphics.DrawString(drawString, drawFont, drawBrush, x, y, drawFormat);
    drawFont.Dispose();
    drawBrush.Dispose();
    formGraphics.Dispose(); }
      

  5.   

    http://blog.csdn.net/knight94/archive/2006/03/25/638397.aspx
    图像旋转
      

  6.   

            private void Form1_Paint(object sender, PaintEventArgs e)
            {
                Graphics g = e.Graphics;
                g.FillRectangle(Brushes.White, this.ClientRectangle);
                GraphicsPath gp = new GraphicsPath();
                PointF p1 = new PointF(150, 100);
                PointF p2 = new PointF(300, 100);
                gp.AddLine(p1, p2);
                gp.AddString("adfgsg", new FontFamily("Times New Roman"),2, 16, new PointF( p1.X + (p2.X - p1.X) / 2, p1.Y + (p2.Y - p1.Y) / 2 - 16),StringFormat.GenericTypographic);
                
                g.RotateTransform(45);
                g.DrawPath(Pens.Black, gp);        }
    用路径的rotate 就行了