Click here to Skip to main content
15,887,875 members
Articles / Desktop Programming / Windows Forms

An Alpha Channel Composited Windows Form with Designer Support

Rate me:
Please Sign up or sign in to vote.
4.96/5 (124 votes)
5 Oct 2009CPOL8 min read 323.3K   48.8K   279  
An alpha channel composited form for image based Window frames
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><head><title>AlphaForm Namespace</title><link rel="stylesheet" type="text/css" href="../styles/presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"></script><script type="text/javascript" src="../scripts/StyleUtilities.js"></script><script type="text/javascript" src="../scripts/SplitScreen.js"></script><script type="text/javascript" src="../scripts/ElementCollection.js"></script><script type="text/javascript" src="../scripts/MemberFilter.js"></script><script type="text/javascript" src="../scripts/CollapsibleSection.js"></script><script type="text/javascript" src="../scripts/LanguageFilter.js"></script><script type="text/javascript" src="../scripts/CookieDataStore.js"></script><meta name="file" content="43a6d8c0-dedc-c2a8-e94a-65433da6bed3" /><xml xmlns:msxsl="urn:schemas-microsoft-com:xslt"><MSHelp:Attr Name="AssetID" Value="N:AlphaForm" /><MSHelp:Keyword Index="A" Term="N:AlphaForm" /><MSHelp:Keyword Index="A" Term="frlrfAlphaForm" /><MSHelp:Keyword Index="K" Term="AlphaForm namespace"></MSHelp:Keyword><MSHelp:Keyword Index="F" Term="AlphaForm" /><MSHelp:Attr Name="TopicType" Value="apiref" /><MSHelp:Attr Name="TopicType" Value="kbSyntax" /><MSHelp:Attr Name="Locale" Value="en-us"></MSHelp:Attr><MSHelp:Attr Name="Abstract" Value=" " /></xml></head><body><script type="text/javascript">var store = new CookieDataStore('docs');registerEventHandler(window, 'load', function() { var ss = new SplitScreen('control', 'main'); selectLanguage(store.get('lang')); });</script><div id="control"><span class="productTitle">AlphaForm Help</span><br /><span class="topicTitle">AlphaForm Namespace</span><br /><div id="toolbar"><span id="chickenFeet"><a href="d4648875-d41a-783b-d5f4-638df39ee413.htm">Namespaces</a> ► <span class="nolink">AlphaForm</span></span><span id="languageFilter"><select id="languageSelector" onchange="var names = this.value.split(' '); toggleVisibleLanguage(names[1]); lfc.switchLanguage(names[0]); store.set('lang',this.value); store.save();"><option value="CSharp cs">C#</option><option value="VisualBasic vb">Visual Basic</option><option value="ManagedCPlusPlus cs">Visual C++</option></select></span><script>var sd = getStyleDictionary(); var lfc = new LanguageFilterController();</script></div></div><div id="main"><span style="color: DarkGray"> </span><div class="summary"> </div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif"></img> Declaration Syntax</div><div class="sectionContent"><table class="filter"><tr class="tabs" id="syntaxTabs"><td class="tab" x-lang="CSharp" onclick="st.toggleClass('x-lang','CSharp','activeTab','tab'); sb.toggleStyle('x-lang','CSharp','display','block','none');">C#</td><td class="tab" x-lang="VisualBasic" onclick="st.toggleClass('x-lang','VisualBasic','activeTab','tab'); sb.toggleStyle('x-lang','VisualBasic','display','block','none');">Visual Basic</td><td class="tab" x-lang="ManagedCPlusPlus" onclick="st.toggleClass('x-lang','ManagedCPlusPlus','activeTab','tab'); sb.toggleStyle('x-lang','ManagedCPlusPlus','display','block','none');">Visual C++</td></tr></table><div id="syntaxBlocks"><div class="code" x-lang="CSharp"><pre><span class="keyword">namespace</span> <span class="identifier">AlphaForm</span></pre></div><div class="code" x-lang="VisualBasic"><pre><span class="keyword">Namespace</span> <span class="identifier">AlphaForm</span></pre></div><div class="code" x-lang="ManagedCPlusPlus"><pre><span class="keyword">namespace</span> <span class="identifier">AlphaForm</span></pre></div></div><script type="text/javascript">
						var st = new ElementCollection('syntaxTabs');
						var sb = new ElementCollection('syntaxBlocks');
						lfc.registerTabbedArea(st, sb);
						st.toggleClass('x-lang','CSharp','activeTab','tab');
						sb.toggleStyle('x-lang','CSharp','display','block','none');
					</script></div></div><div class="section"><div class="sectionTitle" onclick="toggleSection(this.parentNode)"><img src="../icons/collapse_all.gif"></img> Types</div><div class="sectionContent"><table class="filter"><tr class="tabs" id="typeFilter"><td class="tab" value="all" onclick="tt.toggleClass('value','all','activeTab','tab'); tf.subgroup='all'; ts.process(getInstanceDelegate(tf,'filterElement'));">All Types</td><td class="tab" value="class" onclick="tt.toggleClass('value','class','activeTab','tab'); tf.subgroup='class'; ts.process(getInstanceDelegate(tf,'filterElement'));">Classes</td><td class="tab" value="enumeration" onclick="tt.toggleClass('value','enumeration','activeTab','tab'); tf.subgroup='enumeration'; ts.process(getInstanceDelegate(tf,'filterElement'));">Enumerations</td></tr></table><table id="typeList" class="members"><tr><th class="iconColumn">Icon</th><th class="nameColumn">Type</th><th class="descriptionColumn">Description</th></tr><tr data="class; public"><td><img src="../icons/pubclass.gif"></img></td><td><b><a href="e4b5b68f-eee2-76c4-0b5f-d0e9292c570d.htm">AlphaFormMarker</a></b></td><td><div class="summary">
            AlphaFormMarker serves as a design time aid for specifying 
            one or more points in the background image that will be used
            to build the main form's Region. In the designer, it must
            always be added to the AlphaFormTransformer control (not the main form)
            </div><br /></td></tr><tr data="class; public"><td><img src="../icons/pubclass.gif"></img></td><td><b><a href="f78cb8c6-055c-58ef-c058-8e6d5cf3a4f8.htm">AlphaFormTransformer</a></b></td><td><div class="summary">
            A single instance of AlphaFormTransformer is added to the form
            to be transformed to an alpha channel border window. It hosts all
            controls to be displayed on the window, the image for the layered
            window that displays the image border, and one or more AlphaFormMarkers
            to construct the main form's region. 
            </div><br /></td></tr><tr data="enumeration; public"><td><img src="../icons/pubenum.gif"></img></td><td><b><a href="5b2873a7-bc2a-e005-b211-d60640105289.htm">FadeType</a></b></td><td><div class="summary">
            Fade type
            </div><br /></td></tr></table><script type="text/javascript">
					var tt = new ElementCollection('typeFilter');
					var ts = new ElementCollection('typeList');
					var tf = new TypeFilter();
					tt.toggleClass('value','all','activeTab','tab');
				</script></div></div><div id="footer"> <p />Copyright 2007 Jeff Anderson</div></div></body></html>

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
Jeff Anderson has been a computer graphics software developer for over twenty years.

He is a co-founder of Braid Art Labs and a developer of Braid's GroBoto 3D software. Jeff also dabbles in shareware with an expanded version of the AlphaForm control and other programs here.

Comments and Discussions