Jump to content

Grabbing a screenshot


Recommended Posts

Here is a quick VI using .NET that will take a screenshot of the primary workspace and save it to a file.

This is setup to save the file as a png, but you can easily change it to whatever you want.

The VI will hide itself if it is open so it does not appear in the screenshot.

Let me know if you find this useful or if I have any bugs.

My purpose for this VI was to be able to prgrammatically grab a screenshot of apps I distrubute so I can see what is going on if a user has a question or there is an error. I'm sure there are many other uses.

-John

(written in LV8.5)

Link to comment

QUOTE (TobyD @ Jul 11 2008, 03:23 PM)

That is nice, but it requires access to scripting and uses the clipboard, clearing anything that might be in there already. Unfortunately, I don't have 'scripting' capability in LV8.5.

I like how you added the feature to grab either the whole screen or active window. If it is a LV window, there is already a function in LV to grab the FP as an image, bit if the window is some other app, then that could be useful. My code could be modified to grab the active window, but that would mean detecting the active window and then getting it's coordinates.

My goal is to create a web page that will serve the most recent image and will allow me to 'take a snap' of the screen on demand. I think there is a way to do this in ASP.NET using shared variables but I have a lot to learn in this area...

-John

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.