请教如果保存画的图片
vb.net吧
全部回复
仅看楼主
level 2
请教大神帮忙在保存按钮完善代码,
Dim fs = New System.IO.FileStream("C:\Hello.jpg", IO.FileMode.Create)
PictureBox1.Image.Save(fs, Imaging.ImageFormat.Jpeg)
保存完了是空白文件
2014年12月18日 03点12分 1
level 5
全屏截图并保存的例子
Dim _b As Bitmap = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Dim _g As Graphics = Graphics.FromImage(_b)
Dim _s As Size = New Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
_g.CopyFromScreen(0, 0, 0, 0, _s, CopyPixelOperation.SourceCopy)
PictureBox1.Image = _b
Dim Temp_Topath as string = "D:\"
PictureBox1.Image.Save(Temp_Topath & Format(Now, "yyyyMMdd") & "\" & Format(Now, "yyyyMMddHHmmss") & ".bmp", System.Drawing.Imaging.ImageFormat.Jpeg)
2014年12月18日 06点12分 2
1