Dim p1 As New Point(0, 0)
网站建设哪家好,找创新互联!专注于网页设计、网站建设、微信开发、小程序开发、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了思茅免费建站欢迎大家使用!
Dim p2 As New Point(My.Computer.Screen.WorkingArea.Width, My.Computer.Screen.WorkingArea.Height) '除工具栏全屏
Dim pic As New Bitmap(p2.X, p2.Y)
Using g As Graphics = Graphics.FromImage(pic)
g.CopyFromScreen(p1, p1, p2)
PictureBox1.Image = pic
End Using
Clipboard.SetImage(PictureBox1.Image)
截图到PictureBox1中显示,然后在把PictureBox1.image放到剪切板中
复制文件夹不用剪贴板,使用系统文件操作对象就好了
CreateObject("scripting.filesystemobject").copyfolder "c:\Program Files", "D:\Program Files"
例如,把文件"E:\新建文件夹\a.txt"复制到剪贴板
CreateObject("Shell.Application").NameSpace("E:\新建文件夹").ParseName("a.txt").InvokeVerb "复制(C)"