小弟用.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 会自动增大?有高人能解决这个问题吗
代码如下
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 会自动增大?有高人能解决这个问题吗
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货