An example program can be found
here that contains a VI that simulates keyboard input. You can use it and choose "Snapshot" as your button input and "Down and up" as your action input to add a screenshot to your clipboard. From there you can do what you'd like with it!
Regards,
E. Sulzer
Applications Engineer
National Instruments