Exposing common button icons on .NET windows forms

by James Crowe 26. April 2008 09:50
Recently I was working on a .NET 1.1 Windows form project and wanted to make use the common icons buttons seen in many windows applications.

 e.g  New icon, Save, Copy , Paste

 .NET Standard Icons

Unfortunately the feature to ‘insert standard items’ was only introduced in VS2005 upwards and I needed to use VS2003 for .NET 1.1. Fortunately there’s a very simple solution to this.

Open up VS2005, create a windows form project, Insert a tool strip and select ‘insert standard items’ from the tool strip task menu.

Switch to the code behind view. In the constructor access each tool strip button icon you wish to use.

Next simply save the icons as a bitmap to disk.

this.newToolStripButton.Image.Save(@"C:\Icons\new.bmp");
this.openToolStripButton.Image.Save(@"C:\Icons\open.bmp");
this.saveToolStripButton.Image.Save(@"C:\Icons\save.bmp");

 The bitmaps are now suitable to be imported as an button image in a .NET 1.1 project on VS2003.

Tags:

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar