Ok.. i know how to capture the desktop window with Bitblt. But the problem is that I don't want my form with it.
When I capture the Desktop Window..the image of my form is also captured withit and I want to avoid that..How can I do it?
Printable View
Ok.. i know how to capture the desktop window with Bitblt. But the problem is that I don't want my form with it.
When I capture the Desktop Window..the image of my form is also captured withit and I want to avoid that..How can I do it?
Try something like thisVB Code:
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _ ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const VK_SNAPSHOT = &H2C 'Author: Dalin Nie (Edited by Matthew Gates) 'Origin: [url]http://www.vbcode.com[/url] 'Purpose: This function capture the screen or the active window of your computer. Programmatically and save it to a .bmp file. 'VB version: VB 6,VB 5,VB 4/32 'Save Screen As Bitmap Private Function SaveScreen(ByVal theFile As String) As Boolean On Error Resume Next 'To get the Entire Screen Call keybd_event(vbKeySnapshot, 1, 0, 0) 'To get the Active Window 'Call keybd_event(vbKeySnapshot, 0, 0, 0) SavePicture Clipboard.GetData(vbCFBitmap), theFile SaveScreen = True Exit Function End Function 'Usage Call SaveScreen("C:\Windows\Desktop\shot1.bmp")
Thanks!!!!! But thats not what I want...u know..there was an example from Microsoft that showed internet explorer icons flying on the desktop. Thats was a screensaver. I don't have the sample with me...so if u have it take a look and tell me..