The forum does not permit linking to compiled code. Therefore, I removed the link, since FileScanner.exe is not allowed. If you want to post the source code, you can do that, but the compiled code is not allowed.

I don't see much point in linking to anything at this point, anyways. The question seems to be about taking a screenshot. You say that the program works great if you first select an image (or a directory), then at worst, you could save the screenshot to a specific directory and always just scan that directory. More likely, you have a means to pass a specific file to the program, in which case you can pass a specific screenshot, as well. If that is the case, the program isn't relevant, just getting the screenshot, and perhaps formatting it, is all that is necessary.