屏幕截图,不用API
来源:互联网 发布:破解苹果mac密码 编辑:程序博客网 时间:2024/06/04 23:01
Public Class Form1 Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim point1 As Point Dim point2 As Point Dim pic As Bitmap Me.Hide() point1 = New Point(0, 0) point2 = New Point(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height) pic = New Bitmap(point2.X, point2.Y) Using g As Graphics = Graphics.FromImage(pic) g.CopyFromScreen(point1, point1, point2) Me.BackgroundImage = pic End Using Me.Show() End SubEnd Class