Search Wiki:
Images.Show - a developer resource (formally PhotoViewer)
The Images.Show (also known as the Windows XP to Windows 7 - XP2Win7) developer resource provides a tour of the unique Windows 7 technical features that enable developers to “light up” their applications on Windows 7. The Images.Show is a WPF application that runs on XP and Windows Vista. But the fun starts when you run the same application on Windows 7, which unlocks new technologies such as Taskbar, the Sensors and Location Platform, and Multitouch, as well as “old” Vista friends such as Application Recovery and Windows Search. This project shows that by exploiting Windows 7 features you can add a great deal of value to your application with relatively little effort and without sacrificing backward compatibility.

We designed this developer resouces application as an “educational” project to show developers how to “light up” existing Windows applications by using built-in Windows 7 technologies without sacrificing backward compatibility for existing Windows XP customers. Our goals are to lower the bar for managed code developers who want to target Windows 7 native APIs and to show native code developers the new APIs. As a reference “educational” application, the application contains functionality that you do not normally find in regular applications, like a Crash button that will crash your application to demonstrate Windows 7 Restart Manager capabilities.

Ohter features that we use in our application are:
• Windows Search
• UAC
• Scheduled Task
• Windows 7 Taskbar Integration
• Transactional File System
• IO Optimization
• Event Tracing for Windows (ETW)
• Microsoft Management Console
• Windows 7 Libraries
• Windows 7 Sensor and Location Platform
• PowerShell
• Preview Handler
• Aero Glass
• Trigger Start Services

You can download the overview document to get a better understanding of the application capabilities and Windows 7 features that are being used. http://archive.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=XP2Win7&DownloadId=12876

To start using the app, all you need to do is download the application installer and run the MSI, and you are ready to go.

Prerequisite
To run this application you need:
• .NET 3.5 SP1 (which ships in box in Windows 7)
_Note:+ SQL is no longer a prerequisite of the application

You can download the code http://archive.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=XP2Win7&DownloadId=12877 which include the entire project, including setup and the native elements. Make sure you install the application before trying to run the app from Visual Studio. To view the source code and perform partial compilation to the application all you need is Visual Studio 2008 SP1 (or 2010). To fully control every aspect of the application and compile the entire solution (including the native code projects) you will also need Windows 7 SDK .
• Visual Studio 2010 - http://www.microsoft.com/visualstudio/en-us/default.mspx
• Visual Studio 2008 + SP1 - http://www.microsoft.com/visualstudio/en-us/default.mspx
• Windows 7 SDK - http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en


This reference application was developed by Microsoft Developer Platform Evangelism group and Sela Software Labs
Last edited Jun 23 2010 at 9:54 PM  by yochay, version 11
Comments
JJDL wrote  Jul 16 2009 at 12:47 PM  
Fails to load after install. Failed to load the Image Viewer UI. See event Log for additional information. Unfortunately, there is no log file in the installation directory and there are no events in the Windows Event Log.

System.SecurityException: The source was not found, but some or all event logs could not be searched.
Inaccesible logs: Security.
at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
....

Also, I can't see where the source was installed to begin debugging?


hudo wrote  Jul 16 2009 at 8:34 PM  
Same error like JJDL.

Keeron wrote  Jul 16 2009 at 11:20 PM  
I am on Win7 RC, but I think the problem is that on first run you have to run this elevated. Try right-clicking and running as admin. If you installed with the defaults, the setup added start-menu shortcuts for the sources, app, doc. Source seem to be at C:\Users\<users>\Documents\XP2Win7\Source

MuzFrancis wrote  Jul 17 2009 at 12:23 PM  
After initially running as Admin it starts up ok (tried on both Vista and 7 RC, failed on both until ran as Admin).

I get an object ref not set when trying to save a new Album though.

RichardDeeming wrote  Aug 11 2009 at 3:25 PM  
Where is the source code? I ticked the option to install it, but there's no sign of it.

RichardDeeming wrote  Aug 17 2009 at 3:39 PM  
Having given up on getting any source code out of the download labelled "source code" (!), I tried to uninstall. This fails with a permissions error. I finally got it to work by granting all users full control of the "C:\ProgramData\Fabrikam" folder, and resetting the permissions on the mdf and ldf files within the folder.

ScottShriver wrote  Aug 19 2009 at 3:29 AM  
The permissions mentioned by others above may have helped but I was still getting an error "Failed to load the Image Viewer UI. See the Event Log for additional information...". The app needs at least one picture *directly* in the Pictures Library/folder since it gets a list of them and assumes there is at least one in there. On Win7, there is a "Sample Pictures" subfolder within the Pictures folder, but the pictures have to be directly in the Pictures folder, not in a subfolder. The offending line of code is: ImagePath = userPictures.First(), (line number 213 in file C:\Users\{YourName}\Documents\XP2Win7\Source\BusinessLogic\DAL\DataAccessClass.cs)

helpware wrote  Sep 16 2009 at 4:10 AM  
You lost me at the SQL requirement. :-) No thanks.
SQL adds a lot of complexity and offers a huge surface area for things to go wrong. IMHO.

robinhsanner wrote  Sep 21 2009 at 4:37 PM  
JJDL, the error you received is because the Windows EventLog event source is not registered and you are running the application in nonadministrative mode. If you run the application as administrator one time, .NET should register the event source for you automatically and then you can go back to a nonadministrative run mode.

ClayShannon wrote  Sep 25 2009 at 3:57 PM  
I have XP; I downloaded and installed PhotoView, and the splash page looks gr8, but then I get a full page of err msgs, and the app won't even begin. I am running as an administrator.

Updating...
Page view tracker