How to programmatically pin a site to start screen in windows 8 - c#

Is there a way to pin a web site to start screen in IE 10 using code?
I can see shortcuts created for pinned sites in "%userprofile%\AppData\Local\Microsoft\Windows\Application Shortcuts". However, I can't figure out where Windows stores pinned site data. If I simply create a shortcut and drop it in that folder it doesn't work.
For coding I prefer C#, but javascript or vbscript should be fine.

The Customize the Start Screen article on TechNet shows how to put a custom Start screen layout in your deployment. Windows 8.1 adds a Start screen layout policy you can use as well. Deployment issues are better-suited to ServerFault, not StackOverflow.

Related

How do I create custom Widget for my c# app

How do I create custom widget for my c# application.
Example :
I wrote an app that shows in Windows 10 menu just like other apps (example firefox) -
screen
How can I create custom "widget"? To show on my app with some from current state of application.
This application is running on user PC all the time, each hour it refresh some informations and I want them to display on this "widget".
How can I achieve this?
The icons on the Windows start screen are known as "Tiles". The tiles that are dynamic are known as "Live Tiles". I share your frustration about not knowing what to search for in the search engines when you don't know what the correct terminology is.
Although I have never created a Live Tile, I did find this site:
https://msdn.microsoft.com/en-us/magazine/dn857365.aspx
which discusses Live Tiles and has some sample code, which might point you in the right direction.
It doesn't look like a complete solution for what you are looking for, but it should give you enough background to know what to search for.

Control windows volume in Lock Down / alternative shell

I have take the example detailed Here to enable the control of the windows volume from within my WFP app. It works fine under normal conditions.
The app itself will be run while the device (a ruggedized tablet running Win 8.1 IND) is in lockdown mode. Essentially the windows explorer shell is not loaded and our applications become the 'shell', to prevent tinkering / breaking out of our app.
When running in lockdown mode, I cannot control the volume using the method detailed in the link above.
how can this be achieved?
ok, found the answer. Need to use the Core Audio API.
https://blog.sverrirs.com/2016/02/windows-coreaudio-api-in-c.html

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).

Embedding a Website in an App

Is there a way to embed a website (that I have no control what-so-ever over) in an app for Windows Phone?
I basically just want an extremely simple app that's just the Google+ website embeded in an app for Windows Phone. I realize I can just pin the website, but it's just not the same as having a nice pretty icon on the start screen, even if it's just a mobile site in a shell.
I know a small amount of C#, so that's the language I'd prefer.
EDIT: I just found this: How to launch IE7 from a Windows Phone App?
So now my question is, how do I use this so it happens on load?
To answer your question, you can execute the code that you reference in the above link, in the constructor of your MainPage.xaml. The question is, though, why? As you stated, you know you can pin a site, but you want an icon. Are you aware that you can make the icon appear as any part of the web page you are pinning? The tile will look like the page you're on, and the view you are at when you pin. If you want it zoomed out, then zoom out, then pin. Want an image on the page to be your icon? Zoom in on that image, and pin. You have a good deal of flexibility with this, depending on the page, of course.

Categories

Resources