
- #How to take a screenshot on windows with two monitors how to#
- #How to take a screenshot on windows with two monitors install#
- #How to take a screenshot on windows with two monitors code#
It doesnt take care of all different posibilities of screen position.
#How to take a screenshot on windows with two monitors code#
Take a moment and test your code trying out my doodle examples. So I now know exatly from which coordinates to take my screenshot and I have a bitmap that is the correct size and it is now a trivial matter to save it to a file on disc. I do this by using the absolute values of X and Y because those variables can have a negative value in case of secondaries being positioned on the left side or ontop of primary.

I must then calculate the size of the bitmap to use. I now have a start position (X,Y) and an end position (Width, Height) of my screenshot in pixels. After the Snip & Sketch is installed on your PC, you open it to apply its screenshot methods.
#How to take a screenshot on windows with two monitors install#
Click the 'Get' button to install this software on Windows 10. Navigate to the Microsoft Store App and type its name.
#How to take a screenshot on windows with two monitors how to#
What I did instead was to find the lowest possible X and Y values and the highest width + X and height + Y values for each screen and place those in respectable variables as I iterate through the screens in the screens collection. How to take a screenshot of only one monitor on Windows 10, using Snip & Sketch: Step 1. Look at my litttle doodle here to illustrate: Screens placed on the left side and ontop of primary screen have negative coordinates respectively First of all you cant be sure that extra screens are allways positioned on the right side of the primary screen and some might be placed ontop og below primary. You are doing it a bit like my own answer but you are missing a few things. While IO.File.Exists(Path & "\" & Filename & counter & "." & extension) ScreenGrab.Save(Path & "\" & GetFilename() & "." & extension, .Jpeg)

G.CopyFromScreen(startLocation.X, startLocation.Y, 0, 0, New Size(endLocation.X + Math.Abs(startLocation.X), endLocation.Y + Math.Abs(startLocation.Y))) If + > endLocation.Y ThenĮndLocation.Y = + ĭim screenGrab As New Bitmap(endLocation.X + Math.Abs(startLocation.X), endLocation.Y + Math.Abs(startLocation.Y))ĭim g As = (screenGrab) If endLocation.X ThenĮndLocation.X = + Public Function TakeScreenshot() As Imageĭim screens As Screen() = Screen.AllScreens Private Filename As String = "Screenshot_" Screenshot of just the active window (no matter the size):Private Path As String = "C:\Temp\ScreenShots"

