473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Screenshot From Dual Monitors

I need some code for getting screenshots from the secondary monitor on dual
monitor display.

Here's a bit of the code for a screen from the primary monitor.

Bitmap MyImage = new Bitmap(Screen.P rimaryScreen.Bo unds.Width,
Screen.PrimaryS creen.Bounds.He ight, g1);

For the second monitor I can use the Screen.Allscree ns method to get and
array of the screens. So far that is looking like this...

Screen[] screens = Screen.Allscree n;

I'm not 100% on that syntax since I don't have the code infront of me but
you get the idea..

Now from that array how do I access the second monitor. I've been successful
in getting dimensions and such like 'screens[1].Bounds.width' or
screen[1].Displayname but I don't know how to get the screen shot via
somthing like...

Bitmap MyImage = new Bitmap(Screen.P rimaryScreen.Bo unds.Width,
Screen.PrimaryS creen.Bounds.He ight, g1);

in the above PrimaryScreen lets the program know to use the primay display,
how do I reference the second monitor?

Nov 16 '05 #1
1 4074
Take a look at:

http://www.syncfusion.com/FAQ/WinFor..._c3c.asp#q870q

On how to get a screenshot of a form.

I believe you can use similar technique but I'm pretty sure it's got to be
done in unmanaged code. Basically, instead of doing the capture of the
device context for the form, you'd be doing it against the:

GetWindowDC(Get DesktopWindow() )

Both of those are Windows GDI calls.

Pete

"Patrick" <NA@NA.com> wrote in message
news:c9******** ***@spnode25.ne rdc.ufl.edu...
I need some code for getting screenshots from the secondary monitor on dual monitor display.

Here's a bit of the code for a screen from the primary monitor.

Bitmap MyImage = new Bitmap(Screen.P rimaryScreen.Bo unds.Width,
Screen.PrimaryS creen.Bounds.He ight, g1);

For the second monitor I can use the Screen.Allscree ns method to get and
array of the screens. So far that is looking like this...

Screen[] screens = Screen.Allscree n;

I'm not 100% on that syntax since I don't have the code infront of me but
you get the idea..

Now from that array how do I access the second monitor. I've been successful in getting dimensions and such like 'screens[1].Bounds.width' or
screen[1].Displayname but I don't know how to get the screen shot via
somthing like...

Bitmap MyImage = new Bitmap(Screen.P rimaryScreen.Bo unds.Width,
Screen.PrimaryS creen.Bounds.He ight, g1);

in the above PrimaryScreen lets the program know to use the primay display, how do I reference the second monitor?

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
30414
by: KJM | last post by:
How can I detect if the user has dual monitors and then how do I control which monitor a form is displayed on. Currently my forms always come up on my right monitor. What if I want to have it always display on my left one? Thanks Ken
3
3622
by: Frank Rizzo | last post by:
Is there anyway to be able to split vs.net between 2 monitors? For instance, on one monitor, I'd like to have the form in design mode, while the other monitor would have the code for the form. Or at least be able to split a code window between 2 monitors. Is this even possible? Thanks.
2
1780
by: Strah | last post by:
Is there a way to determine whether a computer is connected to dual monitors with VB.NET code? Thanks, Strah
3
7679
by: fournij | last post by:
Hi I'm writing a MFC C++ application using Visual .NET. I'm using a Dual Head video card with 2 monitors. I want to start my application in the first monitor but open a dialog box in the second monitor. I tried to set the X position of the dialog box greather thant the first screen resolution, but the dialog box still appear on the first...
0
1341
by: Neji | last post by:
Is there a way to make a keyboard shortcut to change the mouse focus between dual monitors? For example, if I'm on the left-hand screen, would be able to hit a button combination that would change the mouse focus to the right-hand monitor? It seems like I waste a large amount of time moving the mouse between monitors, so it would be great if...
0
1259
by: Neji | last post by:
Is it possible to switch between dual monitors with the keyboard? For example, if I am on the left-hand monitor, can I press a keyboard combination to teleport the mouse cursor to the middle of the right-hand monitor? And if I am on the right-hand monitor, can I press a keyboard combination to teleport the mouse cursor to the middle of the...
8
6084
by: Sheldon | last post by:
I just received a 2nd (configured as a dual) monitor but, for Access only, I can't seem to figure out, if it's possible, to view, say, Table1 on one monitor and Table2 on the other monitor. If I open Table1, then Table2, Table2 apparently sits directly over Table1 and seems anchored so that I cannot move it "out of the way". Is this...
2
6062
by: Cindy | last post by:
I've been using dual monitors for about a year now (absolutely love it), but have run into a weird situation with Access 2000 lately. I loaded a database on two PC's that do NOT have dual monitors, and when I try to open 2 different forms from this database, it looks/feels like nothing is happening. If I look in the window list, the form IS...
3
4755
by: kssnatha | last post by:
Hi, I have a issue when i open a popup in dual monitors. I opened a popup from my page using windows.open() method. During popup loading i used both moveTo and resizeTo methods. Its working fine with single monitor. But when working with two monitors only one half (vertical) of the popup is displayed. Its a complete popup with close,minimize...
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.