PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Any way of printing contents of Window/Page?
Any way of printing contents of Window/Page?
Débuté par Jiva Sztraka, 22 juil. 2016 06:20 - 3 réponses
Posté le 22 juillet 2016 - 06:20
Hi - I've manually created somewhat of a report/record within a window/page (not report) - and am trying to figure out a way of printing the contents of the window. However all I can seem to find is information regarding printing reports.

Is there any way of accomplishing this?

Regards

Jiva
Posté le 22 juillet 2016 - 13:35
Hi Jiva,

> Is there any way of accomplishing this?

Sure...

Use the dcopyxxxx function to do a screengrab of your window, save it as
an image, then do a iPrintImage

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on http://www.fabriceharari.com
Posté le 23 juillet 2016 - 16:15
Fabrice Harari wrote:
Use the dcopyxxxx function to do a screengrab of your window, save it as
an image, then do a iPrintImage


Hi Fabrice - thanks for that - however the issue I now face is that using the dCopyWindowImage function does not grab the entire window, only what's visible within the screen (my window has some content that requires scrolling down to see).

I found out about the WindowBitmap function which would be perfect if only it created the image at run time and not just from the editor, as I have dynamic data on the window which only displays at run time.

Any other way around this?

Thanks,

Jiva
Posté le 30 juillet 2016 - 03:25
Just bumping this back to the top in case there is a solution anyone knows about.

For the time being I've created a working solution by using the dCopyWindowImage function - which works fine so long as the screen resolution is big enough to accommodate all the content of the window without having to scroll - but for smaller screens where scrolling down is necessary, the dCopyWindowImage function is not able to capture the entire window.

Again, the WindowBitmap function would be perfect if only it was able to save the image during run time.

Any ideas would be greatly appreciated!

Regards

Jiva