Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GDI+ How to save directly to a VFP image
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01521803
Message ID:
01521903
Views:
50
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
Previous
Reply
Map
View

Click here to load this message in the networking platform