rt

解决方案 »

  1.   

    picturebox的sizemode属性改成StretchImage不就可以了
      

  2.   

    MouseUP MouseDown MouseMove 事件控制
      

  3.   

    /// <summary>
            /// 放大图形
            /// </summary>
            /// <param name="p_Bitmap">图形</param>
            /// <param name="p_Width">放大后的宽</param>
            /// <param name="p_Height">放大后高</param>
            /// <param name="p_ZoomType">放大类型 true为插值</param>
            /// <returns>放大后的图形</returns>
            public static Image BitmapToBlowUp(Image p_Bitmap, int p_Width, int p_Height, bool p_ZoomType)
            {
                Bitmap _ZoomBitmap = new Bitmap(p_Width, p_Height);            Graphics _Graphics = Graphics.FromImage(_ZoomBitmap);            if (!p_ZoomType)
                {
                    _Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
                    _Graphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half;
                }            _Graphics.DrawImage(p_Bitmap, 0, 0, _ZoomBitmap.Width, _ZoomBitmap.Height);
                _Graphics.Dispose();
                return _ZoomBitmap;
            }