Click here to Skip to main content
15,891,828 members
Articles / Programming Languages / C#

.NET style Side Tab Control

Rate me:
Please Sign up or sign in to vote.
2.42/5 (8 votes)
25 Apr 2002 158.1K   698   53  
.NET Side Tab
/// <fileinfo>
///		<copyright>
///			This file contains proprietary trade secrets of 
///			IronMoon Technology. No part of this file may be 
///			reproduced or transmitted in any form or by any means,
///			electronic or mechanical, including photocopying and 
///			recording, for any purpose without the expressed 
///			written permission of IronMoon Technology. 
///			Copyright (c) 2001-2002 IronMoon Technology
///		</copyright>
///		<author>
/// 		Ravi 
///		</author>
///		<modified date>
/// 		March 20,2002
///		</modified date>
///		<archivename>
/// 		Archive Name: \source\Resources.cs
///		</archivename>
/// </fileinfo>

namespace TreeView
{
	///	
	///	System namespace declarations
	///	
	using System;
	using System.Drawing;
	using System.Reflection;
	using System.Resources;
    
	

	/// <class name="Resource">
	///		<summary>
	///			 Reads the resource file and loads the bitmap  
	///		</summary>
	/// </class>
	public class Resources
	{
		
		/// <variable name="m_resources">
		///	   Creates an instance variable for resource manager
		/// </variable>
		static 	ResourceManager m_resources  = null;

		///	<method name="Resource">	
		///		<summary>
		///			Implements the actions required to initialize 
		///			an instance of Resource class.
		///		</summary>
		/// </method>
		static Resources() 
		{
			m_resources  = new ResourceManager ( "TreeView.IconResources", 
				 Assembly.GetCallingAssembly() );
		}

		
		
		///	<method name="GetBitmap">
		///		<summary>
		///				Used to get the bitmap from the resource file.
		///		</summary>
		///		<returns>
		///			Bitmap
		///		</returns>
		///		<param name="name">
		///			String that returns the bitmap
		///		</param>
		/// </method>
		public static Bitmap GetBitmap
		(
			string name
		)
		{
			Color	transparentColor	= Color.FromArgb ( 0, 128, 128 );
			//	Get the bitmap from the resource file
			Bitmap	tempIcon			= ( Bitmap )m_resources.GetObject( name );
			//	Set the background color of the bitmap as transparent
			tempIcon.MakeTransparent ( transparentColor );
			return ( tempIcon );
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions