小弟用.net写了一个画图工具,在实现复制粘贴的时候出现问题。
代码如下
            Dim x, y As Integer
            'MsgBox(Rectangle_Width)
            x = Rectangle_Width ' + Rectangle_Width * (1 - 940 / PictureBox1.Width)
            y = Rectangle_height '+ Rectangle_height * (1 - 688 / PictureBox1.Height)            Dim S_Image As Bitmap = New Bitmap(x, y)            Dim S_Graphics As Graphics = Graphics.FromImage(S_Image)
            S_Graphics.DrawImage(PictureBox1.Image, 0, 0, New Rectangle(M_Rect.X, M_Rect.Y, Rectangle_Width, Rectangle_height), GraphicsUnit.Pixel)
            Clipboard.SetDataObject(S_Image)
PictureBox1是方在了Panel1中,如果Panel1出现滚动条Rectangle_Width and Rectangle_height 会自动增大?有高人能解决这个问题吗