你可以这样实现:
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g=e.Graphics;
g.FillRectangle(Brushes.White,this.ClientRectangle);
Font f=new Font("宋体",30);

g.ResetTransform();
g.TranslateTransform(ClientRectangle.Width/2,ClientRectangle.Height/2);
g.RotateTransform(45);
g.DrawString("同意",f,Brushes.Red,50,0);
}

解决方案 »

  1.   

    protected override void OnPaint(PaintEventArgs pe)
    {
    Brush b = new System.Drawing.Drawing2D.LinearGradientBrush(ClientRectangle, Color.Red, Color.Orange, 10);
    pe.Graphics.FillRectangle(Brushes.White, pe.ClipRectangle);
    Font f = new Font(Font.Name,20, Font.Style, GraphicsUnit.Pixel);
    // SizeF size=pe.Graphics.MeasureString(scroll,f);
    // Width=(int)size.Width; // Move the origin to the middle of the window:
    System.Drawing.Size sz = Size;
    Point Middle = new Point (sz.Width / 2, sz.Height / 2);
    pe.Graphics.TranslateTransform (Middle.X, Middle.Y);
    // Apply all transforms.... pe.Graphics.RotateTransform (_angle);
    // Create a new StringFormat object to 
    StringFormat format = new StringFormat (StringFormatFlags.NoClip);
    format.Alignment = StringAlignment.Center;
    format.LineAlignment = StringAlignment.Center;
    pe.Graphics.DrawString (scroll, f, b, 0, 0, format);
    // // This is a fancy brush that does graded colors.
    // Brush b = new System.Drawing.Drawing2D.LinearGradientBrush(ClientRectangle, Color.Blue, Color.Crimson, 10);
    // // Use the control's font, resized to the height of the
    // // control (actually slightly less to avoid truncation)
    // Font f = new Font
    // (Font.Name, Height*3/4, Font.Style, GraphicsUnit.Pixel);
    // pe.Graphics.DrawString (scroll, f, b, 0, 0);
    // base.OnPaint (pe);
    // b.Dispose(); 
    // f.Dispose();
    }