Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

.NET style Side Tab Control

, 25 Apr 2002
.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

About the Author

helloravi
Web Developer
United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 26 Apr 2002
Article Copyright 2002 by helloravi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid