我也很想知道....
希望高手多多帮忙啊
我也来顶一下
我试了下
但是不行
估计是窗口的设备场景没找对
把代码给你,试出来后告诉我一声,谢谢
Private Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) As Integer
Private Declare Function ReleaseDC Lib "user32" Alias "ReleaseDC" (ByVal hwnd As Integer, ByVal hdc As Integer) As Integer
Private Declare Function GetWindowDC Lib "user32" Alias "GetWindowDC" (ByVal hwnd As Integer) As Integer
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim ptr As System.IntPtr = GetWindowDC(Me.Handle.ToInt32)
Dim bmp As System.Drawing.Bitmap = Image.FromHbitmap(ptr)
PictureBox1.Image = bmp
ReleaseDC(Me.Handle.ToInt32, ptr)
End Sub