Cesar, there is a problem with the .BitMap.FromScreen() function below that has nothing to do with the code you sent me.
Every time it runs the current form drops about two or more lines down in the _screen resulting in about a half inch of white space at the top between the form and the _screen TitleBar. I tried _screen.LockScreen = .t. and set the form top = 0 but it made no difference. Even with LockScreen on the movement is visible. It's like something in .FromScreen() is sending some line feeds to the _screen.
Any Ideas?
>>I got the following code, with a few mods, from GDI+ samples. (Great stuff by the way)
>>WITH _Screen.System.Drawing
>> loCaptureBmp = .Bitmap.FromScreen(;
>> Thisform.HWnd, ;
>> mLeftOffset, ;
>> mTopOffset, ;
>> mWidth, ;
>> mHeight )
>>
>> loCaptureBmp.Save("C:\Captured.png", .Imaging.ImageFormat.Png)
>>ENDWITH
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn