How to start Windows Store app on specific monitor - c#

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.

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.

Limitations of Background agents and cross-app access in Windows Phone 8.1

Basically I'm working on a project where I need to:
Have a background service that can receive small packets of data from a paired bluetooth (BLE to be precise) device.
Based on the received data, perform various functions on built-in Windows apps (media player, camera, phone dialler etc.) like switch to the next/previous track, alter volume level, take a picture, call a number etc (basically control built-in apps).
Now there was an extensive hardware part to this project which I began working on assuming that Windows Phone would offer the same level of flexibility as Android and that the aforementioned tasks could be easily performed, but now that I searched around a bit and saw the constraints for Background Agents I was dumbfounded to say the least, and by the looks of it the kind of functionality I'm looking for is completely unavailable in WP APIs. And while I couldn't find a definitive answer regarding the second task I wish to perform, I'm assuming the sandbox-style environment which WP apps run in will prevent that from happening as well.
Is there ANY way the above mentioned tasks can be performed with a Windows Phone 8.1 app or even something close?
Short answer: no.
Long answer: for various reasons Windows Phone is designed to provide ultimate control of system functions to the user. In general, all actions have to be user-initiated; even the background tasks have to be ok'd at some point. Reasons include battery life, stability, predictability.
A related policy is that no app may interfere with the operation of another. The only way apps can communicate is via launcher tasks or sharing protocols. Using these you can do things like prompt the user to dial a number.
Out of the tasks you list, the only one I can see being a feasible project is if you write your own camera app or music app that integrates with your Bluetooth device. It's either/or though, you won't be able to make a one-stop app.

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.

Minimize Windows 8 Store App while tracking location with GPS

I'm working on a metro app and am having trouble finding how not to show the application.
We recently deployed tablets to our field reps, and need to add gps tracking. GPS is much easier to deal with in the metro libs (it's like 4 lines of code vs. unmanaged) so we're hoping to be able to push a metro app instead of spending time coding a winforms/wpf desktop app (the tablets are full version windows, so it's an option if we can't hide a metro app. I feel like it should be possible though as the start screen tiles update automatically without opening the main program).
In WPF, it's fairly simple to make a window invisible. I'm creating the metro app in wpf, but it uses different libs than desktop and I may just not know how to do it.
In desktop programs, it's fairly simple. You do something along the lines of:
<Page
x:Class = xxxxxxxx
..
Visibility="Hidden">
Unfortunately, with metro, the only options I have are collapsed and visible. Collapsed doesn't seem to have any effect, unless it's just because it's not deployed and visual studio shows it anyway...
So basically I'm trying to figure out if there's a way to start the program minimized or hidden so that it doesn't interrupt the field reps every time it takes their location.
If you really want to make a metro app and want it to run "minimised" you will need to look at background task. To start the background task the user would still need to start the app at least once, futhermore background task have limitation how how often and how long they can run. Also there is a lot of constraint on deploying a windows store app if you cannot publish it in the store.
If your goal is to just have access to GPS through C# apis, the GPS is actually one of the winRT api you can use from the desktop, you can find a tutorial on how to access winRT api from the desktop here
Here is the complete list of winRT api accessible from the desktop (You can find Geoposition class among them).
Have you looked into creating a background task that transmits GPS? The background task can run without the app running.
I am not entirely certain you can voluntarily minimize a Windows Store App on a user's behalf. I see nothing in IntelliSense about it, nor have I found anything online or see any app do it.
However, be aware that deploying the app without using the Windows Store -- sideloading -- requires Windows 8 Enterprise edition computers joined to the domain OR Windows 8 Pro with a sideloading key ($30 per key, purchased in packs of at least 100.) Perhaps a WPF app with unmanaged code is worth the money and effort.

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