Run different applications on 2 monitors - c#

I have this C# project I'm working on, where I need to launch some videos on the second monitor and my application on the main monitor.
Is this possible to be done in C#? Launch some videos on monitor 2 in full screen and launch my application windows in full screen also.
So basically, I need to know how can select a specific screen and do something on it also how can I make an application launch in full screen.

It should actually be possible using Direct3D i think, while not having done this myself.
You should be able to identify your monitors, and do the appropriate work on each of them.
In your case I would create two different Direct3D Devices with each it's own resources (sharing resources between two different Devices doesn't seem to be possible).
Here are some Direct3D Samples on MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb153298(v=vs.85).aspx
And here you can find a way to creat a Direct3D Device on MSDN too:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb153258(v=vs.85).aspx

Related

How to make Virtual extended screen on windows machine?

I have to develop a windows application whose intention is to split screen in to two virtual monitors like we plug second monitor and windows detect these two monitors and provide settings according to like in this screen shot.
I have to achieve this functionality virtually simulating that a second monitor is attached.
Please guide me how this can be achieved and what logics I should follow?
What kind of windows API I should focus on?
Do I need to interact with windows display drivers or what so ever?
This application has to be developed in C# or VB or VC++ whichever is easy to build in.
The output of this app will cause the screen to be split in two screens and should appear as two separate screens to other applications.
Thanks & Regards.
There might be a api to do it, but for $10 you can get an dongle that plugs in to the computer and creates a fake display. This is the one I used to do it and was happy with.

How to access camera on a windows tablet or attached web cams using Windows Form Application (Not WPF)?

I am trying to develop a Windows Form Application (not WPF) where I would require to preview numbers of cameras available on a tablet or PC, take pictures and then save the pictures in the device.
I am very new to this kind of application development and recently came accross Media Capture but I can not find a good lead to start with.
Can anyone let me know how to approach or how can I build the application with the aforementioned features or provide a good lead??
P.S. Found a good example on https://code.msdn.microsoft.com/windowsapps/media-capture-sample-adf87622/ but it uses XML not the Win Form Application type.....
What kind of cameras do you have? If the cameras support onvif, then there is a good onvif camera software you could try. You can handle many cameras with it, you can take snapshots so I guess it could work for you.

How to start Windows Store app on specific monitor

In a dual monitor system, when starting a Windows 8.1 Store app from the Start Screen or the desktop Task Bar, an app will display its main page on the same monitor that it has been launched from.
I am looking for a way to start the app display on a specific monitor i.e. the primary monitor.
Unfortunately, as of Windows 8.1 there isn't an option to control this. If you have a specific scenario in mind, the best thing to do is describe the need via a request on wpdev.uservoice.com.
Generally speaking, Store apps get only limited information about monitors and system configurations, e.g. I don't know of an API that tells you what monitor you're on.
It's possible that there are third-party configuration tools that let you control this sort of thing, like the ones that let you run Store apps in a desktop window. I don't have any suggestions, however.

How do I utilize the functionality of a multi-monitor setup without physical hardware?

I've spent the past few days researching whether its possible to use the Windows API (Preferably Windows 8) to develop an application that can utilize the features in a multiple physical monitor configuration, from a single physical monitor. As far as I can tell you simply cannot do it, or its just not documented at all. Below I will present my problem and the research I've under-taken in the hopes that someone can provide some knowledge I have not yet encountered.
The Problem
In Windows 7+ multi-monitor configurations are able to utilize some cool desktop features such as being able to use a single large desktop that spans multiple monitors, seamless application dragging between them, ability to toggle whether to have the taskbar span or not, etc.
The Virtual Screen (MSDN link).
I would like to gain access to this API and allow my application to use it to allow the user to effectively have multiple virtual desktops from a single physical monitor. Simple as that.
The Solution
Here I will present a number of proposed solutions I have found, and why they will not work (As far as I can tell).
1. Use the Window Station & Desktop API to create entirely new desktops and flip between them.
"A window station is a securable object that is associated with a process, and contains a clipboard, an atom table, and one or more desktop objects.
A desktop is a securable object contained within a window station. A desktop has a logical display surface and contains user interface objects such as windows, menus, and hooks."
MSDN Link.
This is a really clean and simple way to effectively create multiple desktops in windows that allows the user to switch between on a single monitor. However it has the following large caveat:
"Windows doesn't provide a way to move a window from one desktop object to another, and because a separate Explorer process must run on each desktop to provide a taskbar and start menu, most tray applications are only visible on the first desktop." Sysinternals on TechNET.
2. Attempt to create a fake display driver to force Windows to believe it has more than one monitor.
This appears to have been a valid option for a couple of existing similar applications such as ZoneScreen. However in Windows 7 it became difficult to install the unsigned driver and in Windows 8 it appears to be flat out impossible.
3. Fake it by attempting to track applications and force them to hide between user defined monitor groups.
Both commercial and free applications such as DisplayFusion and Finestra Virtual Desktops appear to use a highly convoluted and complex system of tracking launched applications and attempting to hide and unhide them as the user switches between virtual monitors.
This is the most workable solution as it largely meets all the requirements. But its a hack - Some applications don't really work with it and there are many corner cases where it will fail.
What am I missing here? Is any of my research incorrect thus far? Are there areas of the API that I haven't yet plumbed?
develop an application that can utilize the features in a multiple physical monitor configuration, from a single physical monitor
The Windows API ties each desktop to a explorer process and the taskbar,notifications etc are managed on a per-desktop basis. It is possible to create new virtual desktops using this API by creating a new desktop object. However if you are trying to create something that is the equivalent of workspaces in linux distros, then you are out of luck. The desktop object manages the applications launched under a process tree and moving applications between these desktop objects etc is not possible due to the way windows explorer handles work.
The Solution
Here I will present a number of proposed solutions I have found, and why they will not work (As far as I can tell).
The only way to achieve something close to workspaces is to fake it -
each workspace and its process have to be show in the taskbar/notification area by slots. But this is very tough to achieve and games, fullscreen apps etc are bound to break. I am not aware of how this will work out in Win8 either. So yes - workspaces in Windows are going to suck from the get-go.

How to use a monitor which is not part of desktop (Windows 7)

I would like to use a monitor which is actually marked "disconnected" in the windows control panel under "Change display settings". (I do NOT mean a physically disconnected monitor.)
I know how to add a second monitor in Windows and make it part of desktop. I also know how to make my application run on a primary or on secondary monitor when they are part of desktop.
I have a piece of equipment attached to the PC which has a touch screen on it. The touchscreen is connected to the PC over USB looking as an ordinary USB-Monitor and I can make it part of my Windows desktop. But that is not what I want.
What I would like to do is make sure that only one special application can run on this monitor. I also do not want to have a windows desktop on it because than the user could move any window to it which is not what I want. The idea behind all this is to use the touch screen to have an application on it which can control this external piece of equipment. The user would only have to run the PC but not to login. I was thinking about starting the app from a windows service before the windows desktop is loaded. And once the user logs in I do not want him to be able to use the touch screen for anything else except this special application. That is why the touch screen must not be part of the windows desktop but ”deactivated”.
I am using . NET 4.0 and C# for my application, but I will use C++ or whatever comes handy.
Any help or idea is appreciated. Thank you!
It seems WDDM does not support independent displays any more. Here are a few links in case somebody wishes to take a look for himself:
(old MSDN link) = /windows/win32/gdi/multiple-display-monitors
(old MSDN link) = /windows/win32/gdi/using-multiple-monitors-as-independent-displays
The important part is this note from the second link:
ⓘ Note
Using other monitors as independent displays isn't supported on drivers that are implemented to the Windows Display Driver Model (WDDM).

Categories

Resources