>I know somewhere I saw something somewhere about being able to capture part of a screen as a bitmap. It would be great if I could capture the contents of a container and save it as a jpeg, png or whatever. The trick is that I need to do this for multiple VFP containers on the screen and without user intervention other than pressing the Save button. Does anyone know of any sample code or can point me in the right direction?
This is using the GDIPLUX library, and following the samples included with the library,
Do System.app
Local lnTop As Integer, lnLeft As Integer, lnHeight As Integer, lnWidth As Integer
lnTop = Thisform.Container.Top
lnLeft = Thisform.Container.Left
lnHeight = Thisform.Container.Height
lnWidth = Thisform.Container.Width
Local loCaptureBmp As xfcBitmap, lcFileName As String,
lcFileName = Addbs(GetEnv("TEMP")) + "Screenshot.png"
loCaptureBmp = _Screen.System.Drawing.Bitmap.FromScreen(Thisform.HWnd, lnLeft, lnTop, lnWidth, lnHeight)
loCaptureBmp.Save(lcFileName, _Screen.System.Drawing.Imaging.ImageFormat.Png)
I never forget a face, but in your case I will make an exception :-)