#如何制作旋转椭圆形按钮?就是右键单击可以旋转?

解决方案 »

  1.   

      public   class   RoundButton   :Button     
      {   
      protected   override   void   OnPaint(System.Windows.Forms.PaintEventArgs   pevent)   
      {   
      this.Size   =new   Size(50,50);   
      System.Drawing.Drawing2D.GraphicsPath   aCircle   =   
      new   System.Drawing.Drawing2D.GraphicsPath();   
      aCircle.AddEllipse(new   System.Drawing.RectangleF(0,0,50,50));   
        
      this.Region   =new   Region(aCircle);   
      }   
      }   
        
      private   void   Form1_Load(object   sender,   System.EventArgs   e)   
      {   
      RoundButton   rb   =   new   RoundButton();   
      rb.Click   +=   new   System.EventHandler(this.roundButton_Click);   
      this.Controls.Add(rb);   
      }   
        
      private   void   roundButton_Click(object   sender,System.EventArgs   e)   
      {   
      MessageBox.Show("Hello");   
      }
      

  2.   

    两张图片的,一张不动的一张gif, web上实现时是在<img>元素上加js代码的