Option Explicit Private Declare Function PrintWindow Lib "user32" (ByVal SrcHwnd As Long,ByVal DesHDC As Long,ByVal uFlag As Long) As Long Private Sub Command1_Click() Picture1.Width = Me.Width: Picture1.Height = Me.Height Call PrintWindow(Me.hWnd,Picture1.hDC,0) Picture1.Refresh SavePicture Picture1.Image,"C:/SilenceNet.Bmp" End Sub Private Sub Form_Load() Me.Left = -1000 '呐!把窗口移到屏幕外面去了啊 Picture1.Visible = False Picture1.AutoRedraw = True Picture1.BorderStyle = 0 Picture1.Appearance = 0 End Sub
就这么多代码,本来想不用PictureBox的,后面创建了个内存DC,不知咋的了没效果,不知道是不是兼容DC没设置,简单点吧,不整那东东了.
代码就这么多
不想拷的直接下工程文件..
http://download.csdn.net/source/1416633