public partial class Form1 : Form
    {
        Bitmap memBitmap;
        
float currRotation = 10;
        Rectangle rect 
= new Rectangle(10050150100);
        
public Form1()
        {
            InitializeComponent();
            memBitmap 
= new Bitmap(this.Width, this.Height);
            
using (Graphics g = Graphics.FromImage(memBitmap))
            {
                g.DrawRectangle(Pens.Blue, rect);
            }
        }
        
protected override void OnMouseWheel(MouseEventArgs e)
        {
            currRotation 
-= 5.0f * e.Delta / SystemInformation.MouseWheelScrollDelta;     // 5 degree, you can make it 45
            
        }
posted on 2009-08-04 17:56  李佩亮  阅读(541)  评论(3编辑  收藏  举报