Results 1 to 3 of 3

Thread: [RESOLVED] Taking screenshots of forms

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    May 2018
    Posts
    54

    Resolved [RESOLVED] Taking screenshots of forms

    I need an app to be able to take a screenshot of itself and save that out to a file to use for a journalling features which will track what was on the screen at the time a given control was clicked on. Ideally I just wanted to implement this as a function which can be called with a one liner whenever this is used.

    The journalling feature is all done, and for screenshots I tried using this technique I found in an old post:

    https://www.developerfusion.com/thre...form-as-image/

    The example captures to the clipboard when fired but uses a button as a separate event to save the file. I just added the code for the button onto the end to make it capture and save in one step.

    The problem I'm having is that there seems to need to be a separate process to execute with user intervention for capturing to the clipboard to complete. As it stands, if I run it the first time it gives a runtime error as the clipboard data is invalid. Then on rerunning it will save the screenshot from the first run. Then on a third rerun the screenshot from the second etc etc.

    No way of doing this (including having the capture/save as separate functions) seems to work unless the execution stops. Eg trying

    CALL Capture_Screenshot
    CALL Save_Screenshot

    won't work, but if I plonk a messagebox in between the two calls to break the execution it then will. I've even tried insanely messy attempts to workaround like pasting the screenshot into an imagebox on a hidden form and save the contents of the imagebox or using a timer to call the save, still doesn't work. There needs to be a total break in execution somewhere for the clipboard to update and I can't have this as it needs to happen silently.

    Any ideas? Or an alternative approach to doing the capture?
    Last edited by chris223b; May 20th, 2026 at 05:29 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width