Angry Birds Theme For Windows 7

9. July 2011 09:18


If you love playing Angry Birds on your PC or on your phone, then you will also love Angry Birds theme for Windows 7. The sound effects are cool, just like the one you hear while you play the game and the wallpapers are cool too. I like the red angry bird to sit on my desktop as it is the best wallpaper I can choose among the 6 wallpapers that comes with the theme.


You can download the Angry Birds theme from the Microsoft downloads center here

 No Rating

Prepare Your Site For IE9 With Pinify

14. May 2011 23:10

Jquery Microsoft Windows 

This is great stuff. If you own a website or a blog you should use this excellent feature of pinning fav links of your site on user's Windows 7 taskbar. Though this feature of IE9 was on hype since it's beta realease. Now it's time to use this feature for my blog. But before you start grab the latest stable version of the Pinify (formerly know as IE9ify) from Codeplex.
About Pinify
This plugin is written in jQuery and is hosted on Codeplex. I highly recommend you to follow this project on Codeplex. This plugin is not just about pinning, but also allows the user to customize the skin of the browser, adds a jumplist of your favourite links to the taskbar, overlay icons, tasks and thumbbar buttons. This is a total different user experience for the users /readers of your blog or site.

Preparing your site for the new experience
By now you have downloaded the latest release of the pinify from Codeplex. Open your site in Visual Studio and get to the head section. Fire the below NuGet command to install the Pinify plugin.
For the simplest implementation of this plugin, use the below script in the head section of your page.
<script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.pinify.js" type="text/javascript"></script>

<script type="text/javascript">
$().ready(function () {
Hit F5 and make sure you have selected IE9 as your default browser. After you see your site home page in the browser hit F12 to get the IE9 developer window. Under HTML tab expand the Head tree and you will come to see few meta tags.
Drag and drop the tab to your task bar. This time a new IE window will open but with a difference. Check out below, the navigation buttons has a different color, the site has an icon also.
In the above screenshot you can see the default IE icon because I have not set the favicon for my site. Once I set the fav icon in the head section of my page, I will then have a new favicon to show off. Same is with the navigation buttons, here what you are seeing is the default color, you can set your own like yellow or red or some other different color which matches the theme of your site.
Let's take a bit more complicate example. Now I want to do the same for my blog. For the moment I will have the following in the jumplist.
  • Archives - Link to my blog archive.
  • Twitter
  • Facebook and
  • Contact Me
The icon will be the same as my current favicon. To implement pinify for my blog I do all the work in master page which is site.master in my case. Copy and paste the below script in the head section of your page. Change the text and links accordingly.
<script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.pinify.js" type="text/javascript"></script>
<script type="text/javascript">
        $().ready(function () {
                applicationName: 'Midnight Programmer',
                tooltip: 'Programming For Fun',
                tasks: [{
                    'name': 'Archive',
                    'action': '',
                    'icon': 'favicon.ico'
                    'name': 'Twitter',
                    'action': '',
                    'icon': 'twitter.ico'
                    'name': 'Facebook',
                    'action': '',
                    'icon': 'facebook.ico'
                    'name': 'Contact Me',
                    'action': '',
                    'icon': 'favicon.ico'

After adding the script drag the tab to the taskbar and right-click it to view the task list.  

There are many other things which you can do with this plugin. I have just showed a simplest way to get you jump started with pinify. As you are reading this post try dragging the tab on your windows taskbar and right-click to see the task list as shown above.

Check out this video at Channel 9 by Brandon Satrom creator of pinify.

There are many things which can be done with pinify. To know more read the below links.

 No Rating

Windows 7: Create Jumplists In WPF Application Without Using Windows 7 API Code Pack

26. February 2011 14:24

.NET Framework Windows WPF 

I wrote a blog post on how you can add a custom Jumplist on your Windows form application for Windows 7 platform using the Windows 7 API Code Pack, but that is for Windows Form applications running on Windows 7. 

WPF makes Jumplists more simpler. You need not to add any API reference or any other reference in your project. You can just make the use of Jumplists for better navigation for your users. 

If you are using WPF then, there is a simple way to add Jumplists. I will show how you can have a pre-defined jumplists for your application. The main part of the application in which we have to focus is App.xaml. All work related to jumplist will be done here. For instance use the below code to add calculator to the jumplist.

        <JumpList ShowFrequentCategory="True" ShowRecentCategory="True">
            <JumpTask Title="Calculator"
                      Description="Open Calculator"

You know why there is Title and Description. The ApplicationPath will have the fully qualified name of the application path or just the name of the programs that can be executed with their name. IconResourcePath will have a fully qualified path of the icon. If your application have an icon embedded in the application, then you can just set the application exe path or name else you can have a fully qualified path of the icon file.

To add a new Jumplist, add a new <JumpTask> tag with the above mentioned tags and for every Jumplist item you need to do the same.

 No Rating

How To Free Up Gigs of Space On Your Window 7 Machine

19. February 2011 03:34

Microsoft Windows 

I am now using Windows 7 since its beta release and so far my experience is awesome. But as a developer the hard drive space is always been a problem for me, no matter how many external drives or other stoarge devices you have connected to your machine but the disk space on the host machine is always a primary problem. Windows 7 is more stable OS in Windows family so far (I found it more stable than Win XP) and the reason it is being more stable because everytime you install a program on your Win 7 machine, it automatically creates a snapshot of the host drive. This is because if anything goes wrong with the program or it just crashes causing problems, Windows 7 can recover automatically from that state with the snapshot created before the installation.

But these snapshots hogs up a lot of hard drive sapce and there is no way that you can copy them and place it in a different drive or just change the location of the snapshots been taken by the OS. Therefore to maintain the balance, the OS automatically deletes the last/oldest snapshot from the hard drive resulting some free space for the user and for other processes of the system.  If you no longer require the snapshots (only if you think that your machine is running perfectly fine) execute the below command to delete all the snapshots created so far:

c:\>vssadmin delete shadows /for=c: /all

In the above command /for parameter should have the letter of your Windows OS drive. In my case it is C: (as in majority of the cases it will be C:)

Just in case if you don't want to delete all the snapshots then instead of using the /all parameter use the /oldest parameter. This will dleete the oldest snapshot from the drive:

c:\>vssadmin delete shadows /for=c: /oldest

This will free up some GIGs of space if you are using it for the first time and if you are using it quite frequently then also you end up with MBs of free space.

 No Rating

Windows 7 Development: Working With Task Dialog Class

24. January 2011 16:57

API C# Windows 

Last year, I blogged about few things related to Windows 7 development which includes Jump Lists and Glass Form. The Windows 7 API Code Pack comes with many other features which can be used while developing applications for Windows 7 platform. The Windows 7 API Code Pack comes with some sample applications which exposes the power of the API.

In one of my previous projects I used the Task Dialog class to use some cool looking message boxes like the one we see in Windows 7. If you see the sample code and and the executable, they are working fine but when you write the same code in the code in your application, this will not turn out to be as you would have expected. You will see a runtime error as the one below.


This problem can be resolved by adding a app.manifest file to your project and modifying some part of it. Move to the end of the file and un-comment the <dependency> section of the file.


Hit F5 again and this will do the trick for you, this time you will be able to view the message box as you wanted to. The API sample contains code for all the possible / available task dialog for you to use. But the usage is bit difficult as this cannot be acaieved in a single line like we do with the MessageBox class. Therefore I suggest you to build a helper class / function to get this easy for you. As I used this in one of my projects I have two functions one for showing the information and error messages respectively. You can also have a overload method for this, but as I have used different method names instead as I will be using only two dialogs throughout my project.

For Error Messages:

public static void ShowErrorMessage(string ErrorTitle, string Instruction, string ErrorMessage, string ErrorTrace)
            TaskDialog tdError;
            tdError = new TaskDialog();
            tdError.DetailsExpanded = false;
            tdError.Cancelable = true;
            tdError.Icon = TaskDialogStandardIcon.Error;

            tdError.Caption = ErrorTitle;
            tdError.InstructionText = Instruction;
            tdError.Text = ErrorMessage;
            tdError.DetailsExpandedLabel = "Hide details";
            tdError.DetailsCollapsedLabel = "Show details";
            tdError.DetailsExpandedText = ErrorTrace;


All the properties in the above function is self-explainatory. The code at line:12 will have a expander in the dialog box which will contain more details of the exception.

Function for showing information is also the same but with few things "missing":

public static void ShowInfoMessage(string InfoTitle, string Information, string Message)
            TaskDialog tdInfo;
            tdInfo = new TaskDialog();
            tdInfo.DetailsExpanded = false;
            tdInfo.Cancelable = true;
            tdInfo.Icon = TaskDialogStandardIcon.Information;

            tdInfo.Caption = InfoTitle;
            tdInfo.InstructionText = Information;
            tdInfo.Text = Message;

Sample Usage

//For Error Dialog
ShowErrorMessage("Application Error", "There was an error in creating XML file", ex.Message, ex.StackTrace);

//For Information Dialog
ShowInfoMessage("Application Name", "Image more than 32x32 pixels will be rejected", "Please check the image pixel before you use choose a package icon");

 Error Dialog Box

 Click the Show Details expander icon to view the complete error stack trace.

 Information Dialog Box  

This is just the two types of dialogs I have used for my project, but there are more supported in the API. So to get started see the sample project accompanying the API Code Pack including the one you see while running programs as Administrator while UAC is turned on, a dialog box with a progress bar and lots of more to check. The samples above would get you started.

 If you are a Visual Studio 2010 user with NuGet installed, then you can add the API reference to your project with the below command.
Install-Package Windows7APICodePack
 No Rating