From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i make an automatic Print screen in labview ?????

Most screen capture programs have hotkeys that you can use to capture the screen. Some sit in the taskbar tray. So, you can find yourself a tray-resident screen capture program that has hotkeys, and then all that you would need to do is to send the hotkey command to Windows.

If you search this forum you will find examples on how to do this. For example, the second page in this thread has some examples:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=170138&view=by_date_ascending&page=2
Message 11 of 45
(8,448 Views)
I have been following this discussion very closely because it is something I have been trying to do for years, i.e. create a relatively simple LV VI that will capture and/or print the entire screen. I have been relying on 3rd-party software to accomplish this but would love to be able to do this through LV seamlessly. From the looks of it it's still not that "easy" or "simple". I would think that a simple ActiveX call in vanilla LV and Windows would allow us to do this. I still don't see it. Smiley Indifferent
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 12 of 45
(8,443 Views)
Hi,

to combine both smercurio's and PaulG's message:
maybe it's possible to send a "PrtScr" key event to windows? Then you could access the Windows clipboard to get the screen capture, there are some functions readily available from Wiebe (I think) ...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 45
(8,434 Views)

Hi Marc,

here is my solution to get the screenshot. I generate a key event and read the picture from the clipboard. I´m sure there are some parts of code which can be made better, but i hope it helps.

Mike



Message Edited by MikeS81 on 03-26-2008 09:40 AM
Message 14 of 45
(8,404 Views)
Hi Mike,

very nice work!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 45
(8,393 Views)
Hi everyone,
 
Thank you very much for all of your posts. I haven't been on the forum for a few days. One of my collegues has made a quick .exe in VB that takes a screen shot when F6 is pressed. Using Smercurious program, I am able to launch that VB program every time I need to. Mike, I will try your program since it seems to be a more intelligent way of doing this.
 
Thanks again for all your ideas and your help,
 
regards,
 
Marc
0 Kudos
Message 16 of 45
(8,354 Views)
Thanks Mike, works perfectly !
0 Kudos
Message 17 of 45
(8,350 Views)

Hi Mike,

 

Sorry to bother you again... I have been playing with the options in your Vi but I haven't been able to do  this :

keep the front window opened and maximized (that's ok) and keep an activated screen (in my situation, it is the picture of a webcam working with the origin software of the webcam)  open too while the screen shot is made. In other words, I would like to take a screen shot of the screen as it is (the labview program musn't change anything on the screen).

 

Is this possible,

 

Thanks for your time and help,

Regards,

 

Marc

0 Kudos
Message 18 of 45
(8,322 Views)

Hi Marc,

see the attached picture please. Delete the red marked thinks in your vi. If the constant is true, you get a screenshot of the window with the focus, if the constant is false you get a screenshot of the entire Monitor.

Mike



Message Edited by MikeS81 on 03-31-2008 10:07 AM
Message 19 of 45
(8,317 Views)
Thank you very much  Mike!
 
regards,
 
Marc
0 Kudos
Message 20 of 45
(8,304 Views)