After playing a bit with a Windows 7 slate I decided to create a project, just for fun, to test a few ideas on it.
Basically what I’m trying to create is a companion kind of tool that assists with common tasks related to using applications that are not built to be used in a touch screen, without mouse or keyboard.
I didn’t spend much time on it yet but I decided to show what I’ve got so far. So please be nice and consider this is just a test I’ve created for fun, nothing more.
If your attention span only goes this far, just look at what I’ve built here:
Keep in mind this is a WPF, 32bit application written in C#, running on an Intel Atom slate with 2 GB Ram. I did not disable any visual feature, nor did any optimization on windows itself.
So basically this tools docks into the screen and reads the start menu, offering a Windows Phone 7 style of navigation into the items. It’s quite handy because you can do the whole navigation with your thumb as you hold the device. Now here’s the trick: The start menu items aren’t stored in a single folder but basically in two different places: One is your specific Star Menu Items list and the other is the all users list. You basically have to merge both so a good place to start in .Net is looking at these two places:
These will help you to get the list as it appears in your start menu.
Ah, but not so fast! You will notice that most of the items in these folders are .lnk files, not the actual programs. What’s the challenge with that? None really, unless you want to show the real icons from the each executable these applications correspond to. In which case you will have to decode the .lnk file, find the target executable it links to, and use a few APIs to get the corresponding icon so you can bind it to the WPF list. Piece of cake! :)
Next you can see I added a few buttons for typical things you want to do with windows: Maximize, minimize, etc. How we do that? Basically we have to hook into the foremost open window using a few APIs so we can get the window handler, also known as hWnd. Doing so we can then send commands such as minimize, maximize, close and etc.
But we can do far more than that. Assuming the application running uses old style menus, we can also hook into them, showing an easier to access list to the user without having to even touch the application:
Keep in mind this works with legacy apps. The new ribbon and other styles of menus aren’t that simple to hook into. And that’s why I created another tab, with common tasks we are likely going to execute in most applications:
For these, I simply send the corresponding key combination to the open window so it responds accordingly. Ctrl+S for save, Ctrl+V for paste and so on.
I’ve also been working on a magnifier using the magnifier APIs, but since they aren’t touch compatible I decided for simply opening the windows magnifier instead. I actually managed to make part of the magnifier API work with touch but that was pretty much a hack so never mind about that…
That’s pretty much it. Hope you have as much fun watching it as I had building it :)