Click here to Skip to main content
15,896,207 members
Articles / Desktop Programming / Windows Forms

DataGridView Custom Headers in VB.NET

Rate me:
Please Sign up or sign in to vote.
4.56/5 (16 votes)
9 Mar 2009CPOL3 min read 185.7K   8.7K   47  
How to give Custom Headers to your DataGridView
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>





	<title>CodeProject: Custom draw datagridviewcolumnheader (like excel 2007). Free source code and programming help</title>
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Description" content="Overriding the cellpaint event of the datagridview to give it a gradient background; Author: Andy32; Section: VB.NET; Chapter: Languages">
<meta name="Keywords" content=".NET 2.0, VS2005, C# 2.0, VB, Windows, Dev, WinForms, Intermediate,VB.NET,Languages,Free source code, tutorials">
<meta name="Author" content="The Code Project">
<meta name="Rating" content="General">
<meta name="Robots" content="index, follow">
<meta name="Revisit-After" content="1 days">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - All topics" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=1">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - MFC / C++" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=2">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - C#" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=3">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - ASP.NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=4">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - .NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=5">
<link rel="alternate" type="application/rss+xml" title="CodeProject Latest articles - VB.NET" href="http://www.codeproject.com/webservices/articlerss.aspx?cat=6">
<link rel="alternate" type="application/rss+xml" title="CodeProject Lounge Postings" href="http://www.codeproject.com/webservices/LoungeRSS.aspx">
<link rel="search" type="application/opensearchdescription+xml" title="CodeProject" href="http://www.codeproject.com/info/OpenSearch.xml">
	<!-- base -->
	
<script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="Gradient%20ColumnHeader_files/ga.js" type="text/javascript"></script>
<script type="text/javascript">
   var pageTracker = _gat._getTracker("UA-1735123-1");
   pageTracker._setDomainName("www.codeproject.com");
   pageTracker._setSessionTimeout("1200"); // 20 mins
   pageTracker._initData();
   pageTracker._trackPageview();
</script>
	
	<script type="text/javascript" language="Javascript">//<![CDATA[
if(top!=self)top.location.href=location.href; if(typeof(DemoUrl)!="undefined")document.write(unescape('%3Cme')+'ta http'+'-equiv="re' +'fresh" con'+'tent="1;url='+DemoUrl+unescape('"%3CE'));
//]]></script>

<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/oncopy.js"></script>
<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/JobsSummaryRetriever.js"></script>
<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/jquery-1.js"></script>
<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/addto.js"></script>
<script type="text/javascript" language="Javascript">//<![CDATA[
function ToggleMenu(itemName)
{
	var elm = document.getElementById(itemName);
	var i,others = document.getElementById('SectionMenu');
	for(i=0; i < others.childNodes.length; i++)
	{
		var other = others.childNodes[i];
		if ((other.className == 'MenuSectionBlock') && (other != elm))
			other.style.display='none';
	}
	if (elm.style.display == 'block') elm.style.display='none';
	else elm.style.display='block';
	return false;
}

//]]></script>

<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/bookmark.js"></script>
<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/rateitem.js"></script>
<script type="text/javascript" language="Javascript">//<![CDATA[
function ChkRt(val) { if (val<=2) {$('#RateComDiv').css("display","");}else $('#RateComDiv').css("display","none");}
//]]></script>

<script type="text/javascript" language="Javascript">//<![CDATA[
function MarkAns(MemberID,MsgID,gp,bp,mt,QID){
 document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\"  onclick=\"RateMsg("+MemberID.toString()+","+MsgID.toString()+",6,"+QID.toString()+");\"%3E"));
 document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/good.png\" alt=\"good\" border=\"0\" align=\"absmiddle\" /%3E "+gp+" "+mt+"%3C/a%3E "));
 document.write(" &nbsp;"); document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\"  onclick=\"RateMsg("+MemberID.toString()+","+MsgID.toString()+",7,"+QID.toString()+");\"%3E"));
 document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/bad.png\" alt=\"bad\" border=\"0\" align=\"absmiddle\" /%3E "+bp+" "+mt+"%3C/a%3E"));
 document.write(" &nbsp;&nbsp; "); document.writeln(unescape("[%3Ca href='#xx") + MsgID.toString() +"xx' title='Report as Abuse' onclick='return ReportMsg(" + MemberID.toString());
 document.writeln(", " + MsgID.toString() + unescape(",-2)'%3EVote to Remove Message%3C/a%3E]"));
}

function MsgVFrm(MemberID,MsgID,GB,gp,bp,mt){
 if(!GB)document.write("Rate this message: ");
 document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"5":"1")+unescape(",0);\"%3E"));
 if(GB) document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/good.png\" alt=\"good\" border=\"0\" align=\"absmiddle\" /%3E "+gp+" "+mt+"%3C/a%3E "));
 else document.write(unescape("%3Cimg height=\"14\" width=\"14\" src=\"/script/Forums/Images/thumbs_down.gif\" alt=\"vote 1\" border=\"0\" align=\"middle\" /%3E%3C/a%3E "));
 if(GB)document.write(" &nbsp;"); else for(var i=1; i<=5;i++)
  document.write(unescape("%3Ca class=\"Frm_MHL\" href=\"#xx" + MsgID.toString() + "xx\" title=\"vote this message a " + i.toString() + "\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ", " + i.toString() + ",0)\"%3E%3Cb%3E" + i.toString() + "%3C/b%3E%3C/a%3E "));
 document.write(unescape("%3Ca href=\"#xx" + MsgID.toString() + "xx\" onclick=\"RateMsg(" + MemberID.toString() + ", " + MsgID.toString() + ","));document.write((GB?"1":"5")+unescape(",0);\"%3E"));
 if(GB)document.write(unescape("%3Cimg height=\"20\" width=\"20\" src=\"/script/Forums/Images/bad.png\" alt=\"bad\" border=\"0\" align=\"absmiddle\" /%3E "+bp+" "+mt+"%3C/a%3E"));
 else document.write(unescape("%3Cimg height=\"14\" width=\"14\" src=\"/script/Forums/Images/thumbs_up.gif\" border=\"0\" alt=\"vote 5\" align=\"middle\" /%3E%3C/a%3E "));
 if(GB)document.write(" &nbsp;&nbsp; "); else document.write(unescape("%3Cbr /%3E")); document.writeln(unescape("[%3Ca href='#xx") + MsgID.toString() +"xx' title='Report as Abuse' onclick='return ReportMsg(" + MemberID.toString());
 document.writeln(", " + MsgID.toString() + unescape(",-2)'%3EVote to Remove Message%3C/a%3E]"));
}

function ReportMsg(userid, msgid, score) {
 if (confirm("Are you sure you want this message removed?"))
  return RateMsg(userid, msgid, score, 0);
 else return false;
}
function RateMsg(memberid, msgid, score, questionId) {
 var req = new XMLHttpRequest();
 req.onreadystatechange = function() {
  if (req.readyState == 4){
   if (req.status == 200){
    var respText = req.responseText;
    var re = new RegExp(unescape("\%3Cdiv\%3E([^\%3C]*)\%3C/div\%3E"), "g");
    var match = re.exec(respText);
    voteStatus.innerHTML = unescape("%3Cb%3E") + (match&&match[1])?match[1]:"An error occured" + unescape("%3C/b%3E");
   } else
    voteStatus.innerHTML = unescape("%3Cb style='color:red'%3EFailed!") + req.statusText + unescape("%3C/b%3E");
  }
 }
 var voteStatus = document.getElementById("MVF" + msgid);
 if (!voteStatus) return;
 voteStatus.innerHTML = unescape("%3Cb style='color:green'%3EVoting...%3C/b%3E");
 var strAction = "/script/Forums/Vote.aspx?js=1&fmid="+memberid.toString()+"&select="+msgid.toString()+"&score="+score.toString()+"&qid="+questionId.toString();
 req.open("GET", strAction, true);
 req.send(null);
  return false;
}
//]]></script>

<script type="text/javascript" language="Javascript">//<![CDATA[
var Selected = "-1";

function SwitchMessage(e, msgId)
{
  if (!msgId) {
    if(!e)e=window.event;
    var target=e.target?e.target:e.srcElement;
    while(target&&target.id!='DynMessLink')target=target.parentNode;
    if(!target||target.id!='DynMessLink')return;
    msgId=target.name;
  }
  if(Selected&&Selected!=""){
    var body=eval("document.getElementById('F" + Selected + "_h1')");
    if(body) body.style.display = 'none';
    var head=eval("document.getElementById('F" + Selected + "_h0')");
    if(head) head.className = head.className.replace("Sel", "UnSel");
  }
  if(Selected==msgId.toString())
    Selected="";
  else {
    Selected=msgId.toString();
    var body=eval("document.getElementById('F" + Selected + "_h1')");
    if(body){
      if(body.style.display=='none') body.style.display='';
      else body.style.display = 'none';
    }
    var head=eval("document.getElementById('F" + Selected + "_h0')");
    if (head) 
      head.className = head.className.replace("UnSel", "Sel");
    if(body&&head&&body.style.display!='none'){
      document.body.scrollTop = getRealPos(head, "Top") - document.body.clientHeight/10;
      EnsureMessageVisible(Selected, true);
    }
  }
  if (e){if(e.preventDefault)e.preventDefault;else e.returnValue=false;}
  return false;
}

//]]></script>

<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/ShortCuts.js"></script>
<link type="text/css" rel="stylesheet" href="Gradient%20ColumnHeader_files/CodeProject.css">
<link type="text/css" rel="stylesheet" href="Gradient%20ColumnHeader_files/ForumClassic.css">
<link type="text/css" rel="stylesheet" href="Gradient%20ColumnHeader_files/navmenu.css">
<link rel="icon" href="http://www.codeproject.com/favicon.ico" type="image/ico">
<link rel="shortcut icon" href="http://www.codeproject.com/favicon.ico" type="image/ico">

</head><body>

<a href="#Main"><img alt="Click here to Skip to main content" src="Gradient%20ColumnHeader_files/t.gif" style="border-style: none; position: absolute; top: 0pt; left: 0pt; width: 1px; height: 1px; z-index: 100;"></a>

<div style="margin: 0px; padding: 0px; width: 100%;">
	<div style="width: 100%;">

<table class="MemberNavBar" width="100%" cellpadding="5" cellspacing="0">
<tbody><tr>
<td style="font-weight: bold;">5,945,481 members and growing! (18,857 online)</td>
<td align="right">

<div id="ctl00_MemberMenu_LoggedOnOptions" class="MemberNavBarText">
	
<a id="ctl00_MemberMenu_MyProfile" href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=1338480">Luca Crisi, MCP</a> | 
<a id="ctl00_MemberMenu_MySettings" href="http://www.codeproject.com/script/Membership/Modify.aspx">My Settings</a> |
<a id="ctl00_MemberMenu_MyCodeProject" href="http://www.codeproject.com/script/Membership/MyCodeProject.aspx"><b>My CodeProject</b></a> |
<a id="ctl00_MemberMenu_MyBookmarks" href="http://www.codeproject.com/script/Bookmarks/List.aspx?obtid=2"><img src="Gradient%20ColumnHeader_files/link.png" width="16" align="absmiddle" border="0" height="16"> My Bookmarks</a> |
<a id="ctl00_MemberMenu_MyArticles" href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=1338480">My Articles</a> |

<a id="ctl00_MemberMenu_Signout" href="http://www.codeproject.com/script/Membership/LogOff.aspx?rp=%2fKB%2fvb%2fGradientColumnheader.aspx">Sign out</a>

</div>



</td>
</tr>
</tbody></table></div>
	<table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
		<td class="HeaderLogo"><a href="http://www.codeproject.com/"><img id="ctl00_Logo" src="Gradient%20ColumnHeader_files/logo225x90.gif" alt="The Code Project" style="border-width: 0px; height: 90px; width: 225px;"></a></td>				 
		<td class="HeaderBanner" width="100%" align="right"><script type="text/javascript">document.write(unescape("%3ca%20href%3d%22http%3a%2f%2fwww.codeproject.com%2fRedir.aspx%3fadid%3d9083%26way%3dban%22%20target%3d%22_blank%22%20rel%3d%22nofollow%22%3e%3cimg%20src%3d%22http%3a%2f%2fwww.codeproject.com%2fscript%2fAdm%2fServeImg.aspx%3fFile%3d%252fscript%252fAdm%252fimages%252fesri_W_DevSumm09-Bann_728x90.gif%26C%3dFalse%26adid%3d9083%22%20alt%3d%22%22%20border%3d%220%22%20width%3d%22728%22%20height%3d%2290%22%3e%3c%2fa%3e"));</script><a href="http://www.codeproject.com/Redir.aspx?adid=9083&amp;way=ban" target="_blank" rel="nofollow"><img src="Gradient%20ColumnHeader_files/ServeImg.htm" alt="" width="728" border="0" height="90"></a></td>
	</tr></tbody></table>
	






<div class="NavBarMain">
<ul id="nav">
<li><a href="http://www.codeproject.com/">Home</a></li>
<li><a class="down" href="http://www.codeproject.com/script/articles/latest.aspx">Articles</a>

	<ul class="flyout">
		<li><a class="fly" href="http://www.codeproject.com/script/articles/latest.aspx">Latest</a></li>
		<li><a class="fly" href="http://www.codeproject.com/info/search.aspx">Search</a></li>		
		<li><a class="fly" href="http://www.codeproject.com/script/articles/TopArticles.aspx">Most Popular</a></li>	
		<li><a class="fly" href="http://www.codeproject.com/info/search.aspx?vidlst=152&amp;sa_us=True">Beginner Articles</a></li>
		
		<li><a class="fly" href="http://www.codeproject.com/script/Content/SiteMap.aspx">Topic List</a></li>
		<li><a class="fly" href="http://www.codeproject.com/info/submit.aspx">Submit an Article</a></li>
		<li><a class="fly" href="http://www.codeproject.com/info/submit.aspx#Update">Update an Article</a></li>
		<li><a class="last" href="http://www.codeproject.com/script/awards/CurrentCompetitions.aspx">Article Competition</a></li>
	</ul>
	
</li>
<li><a class="down" href="http://www.codeproject.com/script/Forums/List.aspx">Message Boards</a>

	<ul class="flyout">
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=12076">ASP.NET</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=4486">ATL / WTL / STL</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1647">C++ / MFC</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=3785">(Managed) C++/CLI</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1649">C#</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1648">COM</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=186301">Hardware</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1004117">LINQ and .NET 3.5</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1650">.NET Framework</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1644">OS / SysAdmin</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1004257">Silverlight</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1725">General Database</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1646">VB.NET</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1640">Web Development</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1004114">WPF / WCF / WF</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=3421">XML / XSL</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1642">General Discussions</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/View.aspx?fid=1645">Suggestions / Site Bugs</a></li>
		
		<li><a class="last" href="http://www.codeproject.com/script/Forums/List.aspx">All Message Boards...</a></li>
	</ul>
	
</li>

<li><a href="http://www.codeproject.com/script/Jobs/">Job Board</a></li>


<li><a href="http://www.codeproject.com/script/Catalog/">Component Catalog</a></li>


<li><a href="http://www.codeproject.com/info/faq.aspx">Help!</a>

	<ul class="flyout">
		<li><a class="fly" href="http://www.codeproject.com/info/Guide.aspx">What is 'The Code Project'?</a></li>
		<li><a class="fly" href="http://www.codeproject.com/info/faq.aspx">General FAQ</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Forums/List.aspx">Post a Question</a></li>
		<li><a class="fly" href="http://www.codeproject.com/script/Content/SiteMap.aspx">Site Directory</a></li>
		<li><a class="last" href="http://www.codeproject.com/info/about.aspx">About Us</a></li>
	</ul>

</li>

<li style="float: right;"><a href="http://www.codeproject.com/Lounge.aspx">Lounge</a></li>
</ul>

</div>


	<div style="width: 100%;"><a name="_top"></a><table id="ctl00_ArticleTopHeader_HeaderTable" class="ArticleUneditedHeader" width="100%" cellpadding="3">
	<tbody><tr valign="top">
		<td class="SmallText">
	<a id="ctl00_ArticleTopHeader_ChapterLink" href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=5">Languages</a> »
	<a id="ctl00_ArticleTopHeader_SectionLink" href="http://www.codeproject.com/KB/vb/">VB.NET</a> »
	<a id="ctl00_ArticleTopHeader_SubsectionLink" href="http://www.codeproject.com/KB/vb/index.aspx?#VB.NET%20-%20General">General</a>
	<span id="ctl00_ArticleTopHeader_SkillLevel" class="ArticleIntermediate">&nbsp;&nbsp;&nbsp; Intermediate</span> 
	<span id="ctl00_ArticleTopHeader_LicenceTerms" class="SmallText" style="margin-left: 40px;">License: <a href="http://www.codeproject.com/info/cpol10.aspx">The Code Project Open License (CPOL)</a></span>
	<br><br>
	<h1><span id="ctl00_ArticleTopHeader_ArticleTitle" class="ArticleTopTitle">Custom draw datagridviewcolumnheader (like excel 2007)</span></h1>
	<b>By <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=2959992">Andy32</a></b><br>
	
	<br>
    <span id="ctl00_ArticleTopHeader_ArticleDescr">Overriding the cellpaint event of the datagridview to give it a gradient background</span>
</td>
		<td style="width: 210px;">
	<span id="ctl00_ArticleTopHeader_ArticleAttributes" class="SmallText">VB, C# 2.0, C#, Windows, .NET, .NET 2.0, WinForms, VS2005, Visual Studio, Dev</span>
	<table style="margin: 8px 0pt 0pt; padding: 0pt;" class="SmallText">
	
	<tbody><tr><td>Posted:</td><td><b>28 Jan 2007</b></td></tr>
	
	<tr><td>Updated:</td><td><b>29 Jan 2007</b></td></tr>
	
	<tr><td>Views:</td><td><b>25,307</b></td></tr>
	
	<tr><td>Bookmarked:</td><td><b>38 times</b></td></tr>
	
	
	
	
	<tr><td colspan="2"><b><a id="ctl00_ArticleTopHeader_UneditedLnk" href="http://www.codeproject.com/script/Articles/Unedited.aspx">Unedited contribution</a></b></td></tr>
	
	</tbody></table>
</td>
	</tr>
</tbody></table>

	</div>
</div>

<div>

<div id="ctl00_LHNavBar" class="LHNavBar">

	

<div class="FeatureBlockHeader" style="border-style: none; margin-top: 5px;">Announcements</div>
<div class="FeatureBlockContent" style="border-style: none; padding: 0pt; margin-bottom: 5px;">
<table cellpadding="2">








<tbody><tr valign="middle"><td><img src="Gradient%20ColumnHeader_files/javaduke.jpg" alt="Comp" width="24" height="24"></td>
<td><a href="http://www.codeproject.com/Contests/Java/">Java Competition</a></td></tr>



<tr valign="middle"><td><img src="Gradient%20ColumnHeader_files/smartclient24.jpg" alt="Comp" width="24" align="middle" height="24"></td>
<td><a href="http://www.codeproject.com/Contests/SmartClient/">Smart Client Comp</a></td></tr>



<tr valign="middle"><td><img src="Gradient%20ColumnHeader_files/LAMP.GIF" alt="Comp" width="24" align="middle" height="24"></td>
<td><a href="http://www.codeproject.com/Contests/LAMP/">LAMP drag-bike comp</a></td></tr>



<tr valign="middle"><td><img src="Gradient%20ColumnHeader_files/MonthlyComp.png" alt="Comp" width="24" align="middle" height="24"></td>
<td><a id="ctl00_Announcements_CompLink" href="http://www.codeproject.com/Feature/ArticleCompetition/">Monthly Competition</a></td></tr>
</tbody></table>
</div>
		
	
<div id="Th">

<div class="FeatureBlockHeader" style="margin-top: 7px;">Want a new Job?</div>
<div class="FeatureBlockContent">


<ul class="InfoList">

		<li>
		<a id="RelatedJobs_RC_ctl00_Lnk" href="http://www.codeproject.com/script/Jobs/View.aspx?jid=328">Quality Assurance Engineer</a>
		 at Segula Technologies
		 in United States
		</li>		
	
		<li>
		<a id="RelatedJobs_RC_ctl01_Lnk" href="http://www.codeproject.com/script/Jobs/View.aspx?jid=558">SharePoint Developer</a>
		 at INTEQNA
		 in Canada
		</li>		
	
		<li>
		<a id="RelatedJobs_RC_ctl02_Lnk" href="http://www.codeproject.com/script/Jobs/View.aspx?jid=515">Software Engineer - .NET / SaaS @realdevelopers.com</a>
		 at conject AG / realdevelopers.com
		 in Germany
		</li>		
	
<li>
	<a id="RelatedJobs_LJ" href="http://www.codeproject.com/script/Jobs/List.aspx">View Latest Jobs...</a>
</li>
</ul>

</div>
</div>

	
	
	<div id="SectionMenu">
<div class="MenuCat">Chapters</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=1" onclick="return ToggleMenu('Chapter1');">Desktop Development</a></div>
<div class="MenuSectionBlock" id="Chapter1" style="display: none;">
<div class="MI" id="Section1"><a href="http://www.codeproject.com/KB/buttons/">Button Controls</a></div>
<div class="MI" id="Section15"><a href="http://www.codeproject.com/KB/clipboard/">Clipboard</a></div>
<div class="MI" id="Section2"><a href="http://www.codeproject.com/KB/combobox/">Combo &amp; List Boxes</a></div>
<div class="MI" id="Section67"><a href="http://www.codeproject.com/KB/dialog/">Dialogs and Windows</a></div>
<div class="MI" id="Section107"><a href="http://www.codeproject.com/KB/gadgets/">Desktop Gadgets</a></div>
<div class="MI" id="Section16"><a href="http://www.codeproject.com/KB/docview/">Document / View</a></div>
<div class="MI" id="Section4"><a href="http://www.codeproject.com/KB/edit/">Edit Controls</a></div>
<div class="MI" id="Section17"><a href="http://www.codeproject.com/KB/files/">Files and Folders</a></div>
<div class="MI" id="Section3"><a href="http://www.codeproject.com/KB/grid/">Grid &amp; Data Controls</a></div>
<div class="MI" id="Section5"><a href="http://www.codeproject.com/KB/list/">List Controls</a></div>
<div class="MI" id="Section6"><a href="http://www.codeproject.com/KB/menus/">Menus</a></div>
<div class="MI" id="Section14"><a href="http://www.codeproject.com/KB/miscctrl/">Miscellaneous</a></div>
<div class="MI" id="Section18"><a href="http://www.codeproject.com/KB/printing/">Printing</a></div>
<div class="MI" id="Section95"><a href="http://www.codeproject.com/KB/progress/">Progress Controls</a></div>
<div class="MI" id="Section11"><a href="http://www.codeproject.com/KB/selection/">Selection Controls</a></div>
<div class="MI" id="Section19"><a href="http://www.codeproject.com/KB/shell/">Shell and IE programming</a></div>
<div class="MI" id="Section68"><a href="http://www.codeproject.com/KB/smart/">Smart Client</a></div>
<div class="MI" id="Section8"><a href="http://www.codeproject.com/KB/splitter/">Splitter Windows</a></div>
<div class="MI" id="Section9"><a href="http://www.codeproject.com/KB/static/">Static &amp; Panel Controls</a></div>
<div class="MI" id="Section10"><a href="http://www.codeproject.com/KB/statusbar/">Status Bar</a></div>
<div class="MI" id="Section7"><a href="http://www.codeproject.com/KB/tabs/">Tabs &amp; Property Pages</a></div>
<div class="MI" id="Section12"><a href="http://www.codeproject.com/KB/toolbars/">Toolbars &amp; Docking windows</a></div>
<div class="MI" id="Section13"><a href="http://www.codeproject.com/KB/tree/">Tree Controls</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=2" onclick="return ToggleMenu('Chapter2');">Web Development</a></div>
<div class="MenuSectionBlock" id="Chapter2" style="display: none;">
<div class="MI" id="Section70"><a href="http://www.codeproject.com/KB/ajax/">Ajax and Atlas</a></div>
<div class="MI" id="Section27"><a href="http://www.codeproject.com/KB/applications/">Applications &amp; Tools</a></div>
<div class="MI" id="Section85"><a href="http://www.codeproject.com/KB/asp/">ASP</a></div>
<div class="MI" id="Section89"><a href="http://www.codeproject.com/KB/aspnet/">ASP.NET</a></div>
<div class="MI" id="Section28"><a href="http://www.codeproject.com/KB/webforms/">ASP.NET Controls</a></div>
<div class="MI" id="Section38"><a href="http://www.codeproject.com/KB/ATL-Server/">ATL Server</a></div>
<div class="MI" id="Section29"><a href="http://www.codeproject.com/KB/web-cache/">Caching</a></div>
<div class="MI" id="Section91"><a href="http://www.codeproject.com/KB/web-image/">Charts, Graphs and Images</a></div>
<div class="MI" id="Section25"><a href="http://www.codeproject.com/KB/scripting/">Client side scripting</a></div>
<div class="MI" id="Section30"><a href="http://www.codeproject.com/KB/custom-controls/">Custom Controls</a></div>
<div class="MI" id="Section23"><a href="http://www.codeproject.com/KB/HTML/">HTML / CSS</a></div>
<div class="MI" id="Section24"><a href="http://www.codeproject.com/KB/ISAPI/">ISAPI</a></div>
<div class="MI" id="Section33"><a href="http://www.codeproject.com/KB/server-management/">Site &amp; Server Management</a></div>
<div class="MI" id="Section34"><a href="http://www.codeproject.com/KB/session/">Session State</a></div>
<div class="MI" id="Section113"><a href="http://www.codeproject.com/KB/silverlight/">Silverlight</a></div>
<div class="MI" id="Section36"><a href="http://www.codeproject.com/KB/trace/">Trace and Logs</a></div>
<div class="MI" id="Section31"><a href="http://www.codeproject.com/KB/user-controls/">User Controls</a></div>
<div class="MI" id="Section37"><a href="http://www.codeproject.com/KB/validation/">Validation</a></div>
<div class="MI" id="Section35"><a href="http://www.codeproject.com/KB/viewstate/">View State</a></div>
<div class="MI" id="Section26"><a href="http://www.codeproject.com/KB/WAP/">WAP / WML</a></div>
<div class="MI" id="Section32"><a href="http://www.codeproject.com/KB/web-security/">Web Security</a></div>
<div class="MI" id="Section20"><a href="http://www.codeproject.com/KB/webservices/">Web Services</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=9" onclick="return ToggleMenu('Chapter9');">Enterprise Systems</a></div>
<div class="MenuSectionBlock" id="Chapter9" style="display: none;">
<div class="MI" id="Section98"><a href="http://www.codeproject.com/KB/MCMS/">Content Management Server</a></div>
<div class="MI" id="Section99"><a href="http://www.codeproject.com/KB/biztalk/">Microsoft BizTalk Server</a></div>
<div class="MI" id="Section102"><a href="http://www.codeproject.com/KB/exchange/">Microsoft Exchange</a></div>
<div class="MI" id="Section90"><a href="http://www.codeproject.com/KB/office/">Office Development</a></div>
<div class="MI" id="Section101"><a href="http://www.codeproject.com/KB/sharepoint/">SharePoint Server</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=3" onclick="return ToggleMenu('Chapter3');">Multimedia</a></div>
<div class="MenuSectionBlock" id="Chapter3" style="display: none;">
<div class="MI" id="Section42"><a href="http://www.codeproject.com/KB/audio-video/">Audio and Video</a></div>
<div class="MI" id="Section44"><a href="http://www.codeproject.com/KB/directx/">DirectX</a></div>
<div class="MI" id="Section46"><a href="http://www.codeproject.com/KB/GDI/">GDI</a></div>
<div class="MI" id="Section47"><a href="http://www.codeproject.com/KB/GDI-plus/">GDI+</a></div>
<div class="MI" id="Section43"><a href="http://www.codeproject.com/KB/graphics/">General Graphics</a></div>
<div class="MI" id="Section45"><a href="http://www.codeproject.com/KB/openGL/">OpenGL</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=4" onclick="return ToggleMenu('Chapter4');">Database</a></div>
<div class="MenuSectionBlock" id="Chapter4" style="display: none;">
<div class="MI" id="Section66"><a href="http://www.codeproject.com/KB/database/">Database</a></div>
<div class="MI" id="Section100"><a href="http://www.codeproject.com/KB/reporting-services/">SQL Reporting Services</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=8" onclick="return ToggleMenu('Chapter8');">Platforms, Frameworks &amp; Libraries</a></div>
<div class="MenuSectionBlock" id="Chapter8" style="display: none;">
<div class="MI" id="Section83"><a href="http://www.codeproject.com/KB/atl/">ATL</a></div>
<div class="MI" id="Section117"><a href="http://www.codeproject.com/KB/MFC/">MFC</a></div>
<div class="MI" id="Section88"><a href="http://www.codeproject.com/KB/stl/">STL</a></div>
<div class="MI" id="Section84"><a href="http://www.codeproject.com/KB/wtl/">WTL</a></div>
<div class="MI" id="Section49"><a href="http://www.codeproject.com/KB/COM/">COM / COM+</a></div>
<div class="MI" id="Section76"><a href="http://www.codeproject.com/KB/dotnet/">.NET Framework</a></div>
<div class="MI" id="Section92"><a href="http://www.codeproject.com/KB/winsdk/">Win32/64 SDK &amp; OS</a></div>
<div class="MI" id="Section108"><a href="http://www.codeproject.com/KB/vista/">Vista API</a></div>
<div class="MI" id="Section110"><a href="http://www.codeproject.com/KB/vista-security/">Vista Security</a></div>
<div class="MI" id="Section82"><a href="http://www.codeproject.com/KB/cross-platform/">Cross Platform</a></div>
<div class="MI" id="Section69"><a href="http://www.codeproject.com/KB/game/">Game Development</a></div>
<div class="MI" id="Section73"><a href="http://www.codeproject.com/KB/mobile/">Mobile Development</a></div>
<div class="MI" id="Section106"><a href="http://www.codeproject.com/KB/WC/">Windows CardSpace</a></div>
<div class="MI" id="Section103"><a href="http://www.codeproject.com/KB/WCF/">Windows Communication Foundation</a></div>
<div class="MI" id="Section104"><a href="http://www.codeproject.com/KB/WPF/">Windows Presentation Foundation</a></div>
<div class="MI" id="Section105"><a href="http://www.codeproject.com/KB/WF/">Windows Workflow Foundation</a></div>
<div class="MI" id="Section119"><a href="http://www.codeproject.com/KB/library/">Libraries</a></div>
<div class="MI" id="Section122"><a href="http://www.codeproject.com/KB/powershell/">Windows Powershell</a></div>
<div class="MI" id="Section123"><a href="http://www.codeproject.com/KB/linq/">LINQ</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=5" onclick="return ToggleMenu('Chapter5');">Languages</a></div>
<div class="MenuSectionBlock" id="Chapter5">
<div class="MI" id="Section71"><a href="http://www.codeproject.com/KB/cpp/">C / C++ Language</a></div>
<div class="MI" id="Section72"><a href="http://www.codeproject.com/KB/mcpp/">C++ / CLI</a></div>
<div class="MI" id="Section93"><a href="http://www.codeproject.com/KB/cs/">C#</a></div>
<div class="MI" id="Section78"><a href="http://www.codeproject.com/KB/msil/">MSIL</a></div>
<div class="MI" id="Section86"><a href="http://www.codeproject.com/KB/vbscript/">VBScript</a></div>
<div class="MIS" id="Section87"><a href="http://www.codeproject.com/KB/vb/">VB.NET</a></div>
<div class="MI" id="Section115"><a href="http://www.codeproject.com/KB/vb-interop/">VB6 Interop</a></div>
<div class="MI" id="Section77"><a href="http://www.codeproject.com/KB/net-languages/">Other .NET Languages</a></div>
<div class="MI" id="Section21"><a href="http://www.codeproject.com/KB/XML/">XML</a></div>
<div class="MI" id="Section96"><a href="http://www.codeproject.com/KB/java/">Java</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=6" onclick="return ToggleMenu('Chapter6');">General Programming</a></div>
<div class="MenuSectionBlock" id="Chapter6" style="display: none;">
<div class="MI" id="Section57"><a href="http://www.codeproject.com/KB/recipes/">Algorithms &amp; Recipes</a></div>
<div class="MI" id="Section64"><a href="http://www.codeproject.com/KB/bugs/">Bugs &amp; Workarounds</a></div>
<div class="MI" id="Section79"><a href="http://www.codeproject.com/KB/collections/">Collections</a></div>
<div class="MI" id="Section56"><a href="http://www.codeproject.com/KB/security/">Cryptography &amp; Security</a></div>
<div class="MI" id="Section50"><a href="http://www.codeproject.com/KB/datetime/">Date and Time</a></div>
<div class="MI" id="Section52"><a href="http://www.codeproject.com/KB/DLL/">DLLs &amp; Assemblies</a></div>
<div class="MI" id="Section80"><a href="http://www.codeproject.com/KB/exception/">Exception Handling</a></div>
<div class="MI" id="Section81"><a href="http://www.codeproject.com/KB/locale/">Localisation</a></div>
<div class="MI" id="Section53"><a href="http://www.codeproject.com/KB/macros/">Macros and Add-ins</a></div>
<div class="MI" id="Section54"><a href="http://www.codeproject.com/KB/tips/">Programming Tips</a></div>
<div class="MI" id="Section55"><a href="http://www.codeproject.com/KB/string/">String handling</a></div>
<div class="MI" id="Section22"><a href="http://www.codeproject.com/KB/IP/">Internet / Network</a></div>
<div class="MI" id="Section58"><a href="http://www.codeproject.com/KB/threads/">Threads, Processes &amp; IPC</a></div>
<div class="MI" id="Section59"><a href="http://www.codeproject.com/KB/winhelp/">WinHelp / HTMLHelp</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=10" onclick="return ToggleMenu('Chapter10');">Graphics / Design</a></div>
<div class="MenuSectionBlock" id="Chapter10" style="display: none;">
<div class="MI" id="Section40"><a href="http://www.codeproject.com/KB/expression/">Expression</a></div>
<div class="MI" id="Section114"><a href="http://www.codeproject.com/KB/usability/">Usability</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=11" onclick="return ToggleMenu('Chapter11');">Development Lifecycle</a></div>
<div class="MenuSectionBlock" id="Chapter11" style="display: none;">
<div class="MI" id="Section51"><a href="http://www.codeproject.com/KB/debug/">Debug Tips</a></div>
<div class="MI" id="Section39"><a href="http://www.codeproject.com/KB/architecture/">Design and Architecture</a></div>
<div class="MI" id="Section112"><a href="http://www.codeproject.com/KB/install/">Installation</a></div>
<div class="MI" id="Section41"><a href="http://www.codeproject.com/KB/work/">Work Issues</a></div>
<div class="MI" id="Section128"><a href="http://www.codeproject.com/KB/testing/">Testing and QA</a></div>
<div class="MI" id="Section126"><a href="http://www.codeproject.com/KB/codegen/">Code Generation</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=7" onclick="return ToggleMenu('Chapter7');">General Reading</a></div>
<div class="MenuSectionBlock" id="Chapter7" style="display: none;">
<div class="MI" id="Section60"><a href="http://www.codeproject.com/KB/books/">Book Chapters</a></div>
<div class="MI" id="Section61"><a href="http://www.codeproject.com/KB/book-reviews/">Book Reviews</a></div>
<div class="MI" id="Section109"><a href="http://www.codeproject.com/KB/hardware-review/">Hardware Reviews</a></div>
<div class="MI" id="Section63"><a href="http://www.codeproject.com/KB/interviews/">Interviews</a></div>
<div class="MI" id="Section62"><a href="http://www.codeproject.com/KB/scrapbook/">Scrapbook</a></div>
<div class="MI" id="Section48"><a href="http://www.codeproject.com/KB/system/">Hardware &amp; System</a></div>
</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Content/Chapter.aspx?chptId=12" onclick="return ToggleMenu('Chapter12');">Third Party Products</a></div>
<div class="MenuSectionBlock" id="Chapter12" style="display: none;">
<div class="MI" id="Section65"><a href="http://www.codeproject.com/KB/showcase/">Product Showcase</a></div>
<div class="MI" id="Section124"><a href="http://www.codeproject.com/KB/solution-center/">Solution Center</a></div>
</div>
</div>
<div style="margin-top: 5px;"></div>
<div class="MenuCat">Services</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Jobs/List.aspx">Job Board</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/script/Catalog/index.aspx">Component Catalog</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/Services/TradePub.aspx">Free Magazines</a></div>
<div style="margin-top: 5px;"></div>
<div class="MenuCat">Feature Zones</div>
<div class="MenuChapter"><a href="http://www.codeproject.com/kb/Showcase/">Product Showcase</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/Zones/IBM/">IBM DeveloperWorks</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/Zones/WhitePapers/">WhitePapers / Webcasts</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/redir.aspx?adid=9054">.NET Bug Tracking</a></div>
<div class="MenuChapter"><a href="http://www.codeproject.com/redir.aspx?adid=8763">ASP.NET Web Hosting</a></div>
<div style="margin-top: 5px;"></div>


	<div style="margin: auto; width: 150px;"><iframe src="Gradient%20ColumnHeader_files/ServeHTML.htm" scrolling="no" width="150" frameborder="0" height="80"></iframe>
	</div>
	
	<div style="margin: 10px auto auto; width: 160px;"><iframe src="Gradient%20ColumnHeader_files/ServeHTML_002.htm" scrolling="no" width="160" frameborder="0" height="600"></iframe>
	</div>
</div>

<div id="ctl00_ArticlePane" class="ArticlePane">

	
<table class="SearchHeaderBar" width="100%" cellspacing="0">
<tbody><tr>
<td style="white-space: nowrap; width: 60%;" valign="middle" align="right">
<form method="get" action="/info/search.aspx" name="Search" style="margin: 0pt;">
<b>Search &nbsp;</b>
<input class="SmallText" name="artkw" style="width: 200px;">
<select class="SmallText" style="font-weight: bold;" name="sbo">
<option value="kw" selected="true">Articles</option>
<option value="fm">Messages</option>
<option value="s">Jobs</option>
<option value="ctlk">Search Catalog</option>

</select>
<input class="SmallText" style="font-weight: bold;" value=" Go! " type="submit"> &nbsp;
</form>
</td>

<td class="TinyText" style="white-space: nowrap;">
<a href="http://www.codeproject.com/info/search.aspx">Advanced Search</a><br>
<a href="http://www.codeproject.com/script/Content/SiteMap.aspx">Sitemap</a>

</td>
</tr>
</tbody></table>

	<a name="Main"></a>
	<span id="ctl00_ResultMessage"></span>
	
	
    
	<div id="ctl00_ArtDiv">
	<table border="0" cellpadding="0" cellspacing="0">	
	<tbody><tr valign="top">
		<td valign="top" width="100%">
		    
<table>

</table>



			
<div class="SmallText">
<img src="Gradient%20ColumnHeader_files/print.gif" alt="print" style="vertical-align: middle;" width="16" height="16"><a id="ctl00_ArticleHeaderLinks_PrintLnk" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?display=Print">Print</a> &nbsp;

<img src="Gradient%20ColumnHeader_files/report.gif" alt="Broken Article?" style="vertical-align: middle;" width="16" height="16"><a id="ctl00_ArticleHeaderLinks_BrokenLnk" href="http://www.codeproject.com/script/Articles/Report.aspx?aid=17374">Report</a> &nbsp;


<img id="ctl00_ArticleHeaderLinks_ArticleBmkWatch_Img" src="Gradient%20ColumnHeader_files/watchon.png" alt="Bookmark" style="border-width: 0px; height: 16px; width: 16px; vertical-align: middle;">
<a id="ctl00_ArticleHeaderLinks_ArticleBmkWatch_Lnk" name="bmw_17374_2" class="" onclick="return watchMe(17374, 2);" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=17374&amp;obtid=2&amp;bma=AddWatch">Watch</a>
<span id="ctl00_ArticleHeaderLinks_ArticleBmkWatch_StatusMsg" class="TinyText" style="visibility: hidden;" name="bmw_17374_2"></span>
 &nbsp;

<img id="ctl00_ArticleHeaderLinks_ArticleBmk_Img" src="Gradient%20ColumnHeader_files/link.png" alt="Bookmark" style="border-width: 0px; height: 16px; width: 16px; vertical-align: middle;">
<a id="ctl00_ArticleHeaderLinks_ArticleBmk_Lnk" name="bm_17374_2" class="" onclick="return bookmarkMe(17374, 2);" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=17374&amp;obtid=2&amp;bma=AddBookmark">Bookmark</a>
<span id="ctl00_ArticleHeaderLinks_ArticleBmk_StatusMsg" class="TinyText" style="visibility: hidden;" name="bm_17374_2"></span>

 &nbsp;
	



<style type="text/css">
#ATD {
	position: absolute;
	top: -90px;
	left: -5000px;
	z-index: 200;
	display: none;
	white-space:nowrap;
	background-color:white;
	padding:10px;
	border: solid 1px #999;
}
</style>
<span id="SBI"><img src="Gradient%20ColumnHeader_files/add.gif" id="ctl00_ArticleHeaderLinks_AddTo_Img" alt="add" style="vertical-align: middle;" width="16" height="16">
<a href="#">Share</a></span>
<div style="left: 415px; top: 337px;" id="ATD">

<script language="JavaScript" type="text/javascript">
var socialLinks = new social();
socialLinks.addtoMethod=1;
socialLinks.Horizontal=false;
socialLinks.Showname=true;
socialLinks.DrawLinks("socialLinks", document.location.href, escape(document.title), 100, 0, "SmallText Bold", "AddTo");
socialLinks.setupMenu();
</script><div><a class="AddTo" title="Add this page to Digg" onclick="return socialLinks.addto(0);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Digg.png" width="16" align="absmiddle" border="0" height="16"> Digg</a> </div><div><a class="AddTo" title="Add this page to Del.icio.us" onclick="return socialLinks.addto(1);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Delicious.png" width="16" align="absmiddle" border="0" height="16"> Del.icio.us</a> </div><div><a class="AddTo" title="Add this page to Google" onclick="return socialLinks.addto(2);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Google.png" width="16" align="absmiddle" border="0" height="16"> Google</a> </div><div><a class="AddTo" title="Add this page to Windows Live" onclick="return socialLinks.addto(3);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Live.png" width="16" align="absmiddle" border="0" height="16"> Windows Live</a> </div><div><a class="AddTo" title="Add this page to Yahoo! MyWeb" onclick="return socialLinks.addto(4);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Yahoo.png" width="16" align="absmiddle" border="0" height="16"> Yahoo! MyWeb</a> </div><div><a class="AddTo" title="Add this page to Technorati" onclick="return socialLinks.addto(5);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Technorati.png" width="16" align="absmiddle" border="0" height="16"> Technorati</a> </div><div><a class="AddTo" title="Add this page to Blink" onclick="return socialLinks.addto(6);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Blink.png" width="16" align="absmiddle" border="0" height="16"> Blink</a> </div><div><a class="AddTo" title="Add this page to Facebook" onclick="return socialLinks.addto(7);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Facebook.png" width="16" align="absmiddle" border="0" height="16"> Facebook</a> </div><div><a class="AddTo" title="Add this page to Furl" onclick="return socialLinks.addto(8);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Furl.png" width="16" align="absmiddle" border="0" height="16"> Furl</a> </div><div><a class="AddTo" title="Add this page to Simpy" onclick="return socialLinks.addto(9);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Simpy.png" width="16" align="absmiddle" border="0" height="16"> Simpy</a> </div><div><a class="AddTo" title="Add this page to Reddit" onclick="return socialLinks.addto(10);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Reddit.png" width="16" align="absmiddle" border="0" height="16"> Reddit</a> </div><div><a class="AddTo" title="Add this page to Newsvine" onclick="return socialLinks.addto(11);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_Newsvine.png" width="16" align="absmiddle" border="0" height="16"> Newsvine</a> </div><div><a class="AddTo" title="Add this page to Stumbleupon" onclick="return socialLinks.addto(12);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_stumbleupon.png" width="16" align="absmiddle" border="0" height="16"> Stumbleupon</a> </div><div><a class="AddTo" title="Add this page to Mr. Wong" onclick="return socialLinks.addto(13);" href="#"><img src="Gradient%20ColumnHeader_files/AddTo_MrWong.png" width="16" align="absmiddle" border="0" height="16"> Mr. Wong</a> </div>
</div>
 &nbsp;

<img src="Gradient%20ColumnHeader_files/discuss.gif" alt="Discuss" style="vertical-align: middle;" width="15" height="16"> <a href="#_comments">Discuss</a> &nbsp; 

<img src="Gradient%20ColumnHeader_files/mail.gif" alt="Recommend Article" style="vertical-align: middle;" width="16" height="16">&nbsp;<a id="ctl00_ArticleHeaderLinks_Recommend" href="http://www.codeproject.com/script/common/TellFriend.aspx?obtid=2&amp;obid=17374">Email</a>	
</div>
		</td>
		<td style="text-align: right; white-space: nowrap; width: 100px;">
		<table id="CurRat"><tbody><tr><td>            
<table><tbody><tr><td id="ctl00_ArticleRating_VL" style="white-space: nowrap;" class="SmallText" align="right"> 
<span id="ctl00_ArticleRating_VoteLabel">6 votes for this Article.</span></td>

<td><table border="1" cellpadding="0" cellspacing="0">
	<tbody><tr>
		<td width="20" align="left" bgcolor="White" height="7"><img src="Gradient%20ColumnHeader_files/red.gif" width="20" align="middle" border="0" height="7"></td>
		<td width="20" align="left" bgcolor="White" height="7"><img src="Gradient%20ColumnHeader_files/red.gif" width="20" align="middle" border="0" height="7"></td>
		<td width="20" align="left" bgcolor="White" height="7"><img src="Gradient%20ColumnHeader_files/red.gif" width="20" align="middle" border="0" height="7"></td>
		<td style="padding: 0px; white-space: nowrap;" width="20" align="left" bgcolor="White" height="7"><img src="Gradient%20ColumnHeader_files/red.gif" width="18" align="middle" border="0" height="7"><img src="Gradient%20ColumnHeader_files/white.gif" width="2" align="middle" border="0" height="7"></td>
		<td width="20" align="left" bgcolor="White" height="7"><img src="Gradient%20ColumnHeader_files/white.gif" width="20" align="middle" border="0" height="7"></td>
	</tr>
</tbody></table>
<span id="ctl00_ArticleRating_Votes" class="SmallText"></span></td></tr>
<tr id="ctl00_ArticleRating_PopularityRow">
	<td colspan="2" class="SmallText" align="right">
<a id="ctl00_ArticleRating_PopularityLnk" title="Calculated as rating x Log10(# votes)" href="http://www.codeproject.com/script/Articles/TopArticles.aspx?ta_so=1">Popularity: 3.05</a>
<span id="ctl00_ArticleRating_PopularityLbl"></span><span id="ratingVal">Rating: <b>3.92</b> out of 5</span></td>
</tr>
</tbody></table>



</td>
		<td>            
<div>
<table class="HistTable" title="Voting Distribution. Recent data only"><tbody><tr><td><img src="Gradient%20ColumnHeader_files/t.htm" alt="" title="" width="10" border="0" height="1"><br>1</td>
<td><img src="Gradient%20ColumnHeader_files/pollcol.gif" alt="1 vote, 16.7%" title="1 vote, 16.7%" width="10" border="0" height="5"><br>2</td>
<td><img src="Gradient%20ColumnHeader_files/t.htm" alt="" title="" width="10" border="0" height="1"><br>3</td>
<td><img src="Gradient%20ColumnHeader_files/pollcol.gif" alt="4 votes, 66.7%" title="4 votes, 66.7%" width="10" border="0" height="20"><br>4</td>
<td><img src="Gradient%20ColumnHeader_files/pollcol.gif" alt="1 vote, 16.7%" title="1 vote, 16.7%" width="10" border="0" height="5"><br>5</td>
</tr></tbody></table>
</div>



</td></tr></tbody></table>
		</td>
	</tr>
	</tbody></table>
	
	
	
	

	
	

	
	
	
	
	
	
	
	
	
	<div id="contentdiv">
	
	<!-- Main Page Contents Start -->
	

<!-- Article Starts -->


<ul class="download">
<li><a href="http://www.codeproject.com/KB/vb/GradientColumnheader/Gradientcolumnheader_src.zip">Download source files - 90 Kb</a> </li>
</ul>

<p><img alt="Sample Image - GradientColumnheader.png" src="Gradient%20ColumnHeader_files/GradientColumnheader.png" width="514" height="541"></p>

<h2>Introduction</h2>

<p>As I'm working quite some time now with the code project as a
reliable source which I could depend on improving my developping
skills, I decided it's time to do my own posting. I recently downloaded
the new Office 2007 and I'm quite excited about the new layout. I work
a lot with data and wanted to improve the interface of the
datagridview, with columnheaders similar to the ones found in Excel
2007, with a bit of gradient colour in it. </p>

<h2>Overview</h2>

<p>I first experimented with the columnheader and figured out I had to
switch of the EnableHeadersVisibleStyle option in order to get a color
as background. However, a single color did not quite look like the
gradient headers found in Office 2007. </p>

<p>So, I went further down and found the solution in overriding the
cell paint event of the datagridview. Columnheaders have a rowindex of
-1, which makes it easy to limit the method to be executed only on the
columnheader. There are quite a few option you can choose when
overriding the cell paint event in order to get a custom drawn
columnheader. I have chosen to make use of the graphics object and the
drawimage method, which allowed me to use an image resource as
background. It opens possibilities for re-using the code as part of a
skinning project, but that was beyond my needs for now. </p>

<p>Because of the use of the graphics object, there are some
alternatives for custom painting the datagridview columnheader, like
for instance using a lineargradientbrush. To do that, simply replace
the drawimage part of the method with the fillrectangle method. </p>

<h2>The code</h2>

<p>In the opening event of the form, I put some code to fill the datagridview. We'll skip that part here. </p>

<p>You could choose for creating a class which inherits from the
datagridview and override the cell paint event there, or you could just
override the event in the form class (I have chosen the last option for
the example). </p>

<p>The code looks like this :</p>



<p>Private Sub DataGridView1_CellPainting(ByVal sender As Object, ByVal
e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles
DataGridView1.CellPaintingIf e.RowIndex = -1 ThenDim img As
ImageMy.Resources.HeaderDim format1 As StringFormatNew StringFormatDim
ef1 As SizeF = e.Graphics.MeasureString(e.Value, Me.Font, New
SizeF(CType(e.CellBounds.Width, Single), CType(e.CellBounds.Height,
Single)), format1)Dim txts As SizeDim txtr As Rectangle =
e.CellBoundsDim brush2 As BrushNew StringFormatNew
SolidBrush(Color.FromArgb(21, 66, 139))Me.Font, brush2, CType(txtr,
RectangleF), format1)Dim recBorder As New Rectangle(e.CellBounds.X - 1,
e.CellBounds.Y, e.CellBounds.Width, e.CellBounds.Height - 1)TrueEnd
IfEnd Sub</p>







<p>img = </p>

<p>TekenAchtergrond(e.Graphics, img, e.CellBounds, 1)</p>



<p>format1 = </p>

<p>format1.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show</p>





<p>txts = Drawing.Size.Empty</p>

<p>txts = Drawing.Size.Ceiling(ef1)</p>

<p>e.CellBounds.Inflate(-4, -4)</p>



<p>txtr = HAlignWithin(txts, txtr, ContentAlignment.MiddleCenter)</p>

<p>txtr = VAlignWithin(txts, txtr, ContentAlignment.MiddleCenter)</p>



<p>format1 = </p>

<p>format1.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show</p>

<p>brush2 = </p>

<p>e.Graphics.DrawString(e.Value, </p>

<p>brush2.Dispose()</p>



<p>e.Graphics.DrawRectangle(Pens.LightSlateGray, recBorder)</p>

<p>e.Handled = </p>









<p>

</p><p>In the cellpaint event, I get my header background from the
resource files and pass it along with the graphics object, the drawing
rectangle and an index parameter which can be used if the image file
contains more than one template, for skinning purposes, to the
Tekenachtergrond (I'm from Belgium and tekenachtergrond is Dutch, means
something like draw background) method. As I only use one template in
this example, I set the index to 1. </p>

<p>The method, which is based on an article I found on this site which handles the skinning of controls (<a href="http://www.codeproject.com/cs/miscctrl/skincontrol.asp">link to the article</a>), along with some extra alignment methods and variables, looks like this :</p>
<code>
</code><p>Public</p>











































<p>* oWidth)</p>













<p>r1 = </p>

<p>r2 = </p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>

<p>r1 = </p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>r2 = </p>

<p>- (lr.Top - lr.Bottom)))</p>



<p>= <span class="code-digit">0</span>) </p>



<p>r1.Height = (r1.Height - <span class="code-digit">1</span>)</p>





<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>

<p>r1 = </p>

<p>+ (obj.Height - lr.Bottom)), oWidth, lr.Bottom)</p>

<p>r2 = </p>

<p>+ (r.Height - lr.Bottom)), r.Width, lr.Bottom)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>







<p>r1 = </p>

<p>r2 = </p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>

<p>r1 = </p>

<p>- (lr.Left - lr.Right)), obj.Height)</p>

<p>r2 = </p>

<p>- (lr.Left - lr.Right)), r.Height)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>

<p>r1 = </p>

<p>+ (oWidth - lr.Right)), y, lr.Right, obj.Height)</p>

<p>r2 = </p>

<p>+ (r.Width - lr.Right)), y1, lr.Right, r.Height)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>







<p>r1 = </p>

<p>* oWidth), <span class="code-digit">0</span>, oWidth, (obj.Height - <span class="code-digit">1</span>))</p>

<p>g.DrawImage(obj, </p>











<p>r1 = </p>

<p>r2 = </p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>+ (obj.Height - lr.Bottom)), lr.Left, lr.Bottom)</p>

<p>r2 = </p>

<p>+ (r.Height - lr.Bottom)), lr.Left, lr.Bottom)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>r2 = </p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>- (lr.Left - lr.Right)), lr.Top)</p>

<p>r2 = </p>

<p>- (lr.Left - lr.Right)), lr.Top)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>+ (oWidth - lr.Right)), y, lr.Right, lr.Top)</p>

<p>r2 = </p>

<p>+ (r.Width - lr.Right)), y1, lr.Right, lr.Top)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>+ (oWidth - lr.Right)), (y + lr.Top), lr.Right, (obj.Height _</p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>r2 = </p>

<p>+ (r.Width - lr.Right)), (y1 + lr.Top), lr.Right, (r.Height _</p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>+ (oWidth - lr.Right)), (y _</p>

<p>+ (obj.Height - lr.Bottom)), lr.Right, lr.Bottom)</p>

<p>r2 = </p>

<p>+ (r.Width - lr.Right)), (y1 _</p>

<p>+ (r.Height - lr.Bottom)), lr.Right, lr.Bottom)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>+ (obj.Height - lr.Bottom)), (oWidth _</p>

<p>- (lr.Left - lr.Right)), lr.Bottom)</p>

<p>r2 = </p>

<p>+ (r.Height - lr.Bottom)), (r.Width _</p>

<p>- (lr.Left - lr.Right)), lr.Bottom)</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>





<p>r1 = </p>

<p>- (lr.Left - lr.Right)), (obj.Height _</p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>r2 = </p>

<p>- (lr.Left - lr.Right)), (r.Height _</p>

<p>- (lr.Top - lr.Bottom)))</p>

<p>g.DrawImage(obj, r2, r1, GraphicsUnit.Pixel)</p>













<p><span class="code-keyword">&lt;</span><span class="code-keyword">&gt;</span> </p>



<p>withinThis.X = (withinThis.X _</p>

<p>+ (withinThis.Width - alignThis.Width))</p>



<p><span class="code-keyword">&lt;</span><span class="code-keyword">&gt;</span> </p>



<p>withinThis.X = (withinThis.X _</p>

<p>+ (((withinThis.Width - alignThis.Width) _</p>

<p>+ <span class="code-digit">1</span>) _</p>

<p>/ <span class="code-digit">2</span>))</p>





<p>withinThis.Width = alignThis.Width</p>











<p><span class="code-keyword">&lt;</span><span class="code-keyword">&gt;</span> </p>



<p>withinThis.Y = (withinThis.Y _</p>

<p>+ (withinThis.Height - alignThis.Height))</p>



<p><span class="code-keyword">&lt;</span><span class="code-keyword">&gt;</span> </p>



<p>withinThis.Y = (withinThis.Y _</p>

<p>+ (((withinThis.Height - alignThis.Height) _</p>

<p>+ <span class="code-digit">1</span>) _</p>

<p>/ <span class="code-digit">2</span>))</p>





<p>withinThis.Height = alignThis.Height</p>







<p>How the result looks like, you can see <span class="code-keyword">in</span> the attached screenshot on top of <span class="code-keyword">this</span> article, or you could just download the code and execute the exe-file <span class="code-keyword">in</span> the debugfolder to see the working example.</p>

<p>I hope <span class="code-keyword">this</span> small piece of code can be useful to someone like the many good code examples I found at <span class="code-keyword">this</span> site. </p>

<p>Regards,</p>

<p>Andy</p> Shared anyRight As ContentAlignment =
(ContentAlignment.BottomRight _Or (ContentAlignment.MiddleRight Or
ContentAlignment.TopRight))Public Shared anyTop As ContentAlignment =
(ContentAlignment.TopRight _Or (ContentAlignment.TopCenter Or
ContentAlignment.TopLeft))Public Shared anyBottom As ContentAlignment =
(ContentAlignment.BottomRight _Or (ContentAlignment.BottomCenter Or
ContentAlignment.BottomLeft))Public Shared anyCenter As
ContentAlignment = (ContentAlignment.BottomCenter _Or
(ContentAlignment.MiddleCenter Or ContentAlignment.TopCenter))Public
Shared anyMiddle As ContentAlignment = (ContentAlignment.MiddleRight
_Or (ContentAlignment.MiddleCenter Or
ContentAlignment.MiddleLeft))Private Sub TekenAchtergrond(ByVal g As
Graphics, ByVal obj As Image, ByVal r As Rectangle, ByVal index As
Integer)If (obj Is Nothing) ThenReturnEnd IfDim oWidth As Integer =
obj.WidthDim lr As Rectangle = Rectangle.FromLTRB(<span class="code-digit">0</span>, <span class="code-digit">0</span>, <span class="code-digit">0</span>, <span class="code-digit">0</span>)Dim r2 As RectangleDim r1 As RectangleDim x As Integer = ((index - <span class="code-digit">1</span>) _Dim y As Integer = 0Dim x1 As Integer = r.LeftDim y1 As Integer = r.TopIf ((r.Height <span class="code-keyword">&gt;</span> obj.Height) _AndAlso (r.Width <span class="code-keyword">&lt;</span>=
oWidth)) ThenNew Rectangle(x, y, oWidth, lr.Top)New Rectangle(x1, y1,
r.Width, lr.Top)New Rectangle(x, (y + lr.Top), oWidth, (obj.Height _New
Rectangle(x1, (y1 + lr.Top), r.Width, (r.Height _If ((lr.Top +
lr.Bottom) _ThenEnd IfNew Rectangle(x, (y _New Rectangle(x1, (y1
_ElseIf ((r.Height <span class="code-keyword">&lt;</span>= obj.Height) _AndAlso (r.Width <span class="code-keyword">&gt;</span>
oWidth)) ThenNew Rectangle(x, y, lr.Left, obj.Height)New Rectangle(x1,
y1, lr.Left, r.Height)New Rectangle((x + lr.Left), y, (oWidth _New
Rectangle((x1 + lr.Left), y1, (r.Width _New Rectangle((x _New
Rectangle((x1 _ElseIf ((r.Height <span class="code-keyword">&lt;</span>= obj.Height) _AndAlso (r.Width <span class="code-keyword">&lt;</span>= oWidth)) ThenNew Rectangle(((index - <span class="code-digit">1</span>) _New Rectangle(x1, y1, r.Width, r.Height), r1, GraphicsUnit.Pixel)ElseIf ((r.Height <span class="code-keyword">&gt;</span> obj.Height) _AndAlso (r.Width <span class="code-keyword">&gt;</span> oWidth)) Then<span class="code-string">'</span><span class="code-string">top-leftNew Rectangle(x, y, lr.Left, lr.Top)New Rectangle(x1, y1, lr.Left, lr.Top)'</span>top-bottomNew Rectangle(x, (y _New Rectangle(x1, (y1 _<span class="code-string">'</span><span class="code-string">leftNew Rectangle(x, (y + lr.Top), lr.Left, (obj.Height _New Rectangle(x1, (y1 + lr.Top), lr.Left, (r.Height _'</span>topNew Rectangle((x + lr.Left), y, (oWidth _New Rectangle((x1 + lr.Left), y1, (r.Width _<span class="code-string">'</span><span class="code-string">right-topNew Rectangle((x _New Rectangle((x1 _'</span>RightNew Rectangle((x _New Rectangle((x1 _<span class="code-string">'</span><span class="code-string">right-bottomNew Rectangle((x _New Rectangle((x1 _'</span>bottomNew Rectangle((x + lr.Left), (y _New Rectangle((x1 + lr.Left), (y1 _<span class="code-string">'</span><span class="code-string">CenterNew
Rectangle((x + lr.Left), (y + lr.Top), (oWidth _New Rectangle((x1 +
lr.Left), (y1 + lr.Top), (r.Width _End IfEnd SubPrivate Function
HAlignWithin(ByVal alignThis As Size, ByVal withinThis As Rectangle,
ByVal align As ContentAlignment) As RectangleIf ((align And anyRight)
_CType(0, ContentAlignment)) ThenElseIf ((align And anyCenter)
_CType(0, ContentAlignment)) ThenEnd IfReturn withinThisEnd
FunctionPrivate Function VAlignWithin(ByVal alignThis As Size, ByVal
withinThis As Rectangle, ByVal align As ContentAlignment) As
RectangleIf ((align And anyBottom) _CType(0, ContentAlignment))
ThenElseIf ((align And anyMiddle) _CType(0, ContentAlignment)) ThenEnd
IfReturn withinThisEnd Function</span><code></code>


<!-- Article Ends -->


	<!-- Main Page Contents End -->
	
	</div>
	
	
	<form name="aspnetForm" method="post" action="GradientColumnheader.aspx" id="aspnetForm" style="margin: 0pt; padding: 0pt;">
<div>
<input name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwMDUyNjYzMjgPZBYCZg9kFgQCCw9kFgYCAw8PFgIeB1Zpc2libGVnZGQCCQ8PFgIfAGdkZAIMDw8WAh8AZ2RkAgwPZBYKAgcPZBYQAgEPZBYCZg8WAh4LXyFJdGVtQ291bnRmZAIDD2QWCmYPDxYCHgtOYXZpZ2F0ZVVybAUuL0tCL3ZiL0dyYWRpZW50Q29sdW1uaGVhZGVyLmFzcHg/ZGlzcGxheT1QcmludGRkAgEPDxYCHwIFJi9zY3JpcHQvQXJ0aWNsZXMvUmVwb3J0LmFzcHg/YWlkPTE3Mzc0ZGQCAg9kFgQCBA8PFgIfAgU6L3NjcmlwdC9Cb29rbWFya3MvQWRkLmFzcHg/b2JpZD0xNzM3NCZvYnRpZD0yJmJtYT1BZGRXYXRjaBYGHgRuYW1lBQtibXdfMTczNzRfMh4FY2xhc3NlHgdvbmNsaWNrBRlyZXR1cm4gd2F0Y2hNZSgxNzM3NCwgMik7ZAIGDxYCHwMFC2Jtd18xNzM3NF8yZAIDD2QWBAIEDw8WAh8CBT0vc2NyaXB0L0Jvb2ttYXJrcy9BZGQuYXNweD9vYmlkPTE3Mzc0Jm9idGlkPTImYm1hPUFkZEJvb2ttYXJrFgYfAwUKYm1fMTczNzRfMh8EZR8FBRxyZXR1cm4gYm9va21hcmtNZSgxNzM3NCwgMik7ZAIGDxYCHwMFCmJtXzE3Mzc0XzJkAgUPDxYCHwIFMS9zY3JpcHQvY29tbW9uL1RlbGxGcmllbmQuYXNweD9vYnRpZD0yJm9iaWQ9MTczNzRkZAIFD2QWBAIBD2QWAgIBDw8WAh4EVGV4dAUZNiB2b3RlcyBmb3IgdGhpcyBBcnRpY2xlLmRkAgYPZBYCZg9kFgQCAQ8PFgQfBgUQUG9wdWxhcml0eTogMy4wNR8CBSkvc2NyaXB0L0FydGljbGVzL1RvcEFydGljbGVzLmFzcHg/dGFfc289MWRkAgUPFgIfBgUcUmF0aW5nOiA8Yj4zLjkyPC9iPiBvdXQgb2YgNWQCEQ9kFgICAQ8PFgIfAgUmL3NjcmlwdC9BcnRpY2xlcy9SZXBvcnQuYXNweD9haWQ9MTczNzRkZAIZD2QWCgIBD2QWBAIBDxYCHglpbm5lcmh0bWwFtgE8cD5UaGlzIGFydGljbGUsIGFsb25nIHdpdGggYW55IGFzc29jaWF0ZWQgc291cmNlIGNvZGUgYW5kIGZpbGVzLCBpcyBsaWNlbnNlZCB1bmRlciA8YSBocmVmPSJodHRwOi8vd3d3LmNvZGVwcm9qZWN0LmNvbS9pbmZvL2Nwb2wxMC5hc3B4Ij5UaGUgQ29kZSBQcm9qZWN0IE9wZW4gTGljZW5zZSAoQ1BPTCk8L2E+PC9wPmQCAg9kFgICAQ8QZGQWAGQCBQ8WAh8BAgFkAgcPFgIfBgXjCDxoMj5PdGhlciBwb3B1bGFyIEFwcGxpY2F0aW9ucyAmIFRvb2xzIGFydGljbGVzOjwvaDI+PHVsPjxsaT48YSBocmVmPSIvS0IvYXBwbGljYXRpb25zL3RvZG9saXN0Mi5hc3B4Ij5Ub0RvTGlzdCA1LjcuMiAtIEEgc2ltcGxlIGJ1dCBlZmZlY3RpdmUgd2F5IHRvIGtlZXAgb24gdG9wIG9mIHlvdXIgdGFza3M8L2E+PGRpdiBjbGFzcz0iU21hbGxUZXh0Ij5BIGhpZXJhcmNoaWNhbCB0YXNrIG1hbmFnZXIgd2l0aCBuYXRpdmUgWE1MIHN1cHBvcnQgZm9yIGN1c3RvbSByZXBvcnRpbmcuPC9kaXY+PC9saT48bGk+PGEgaHJlZj0iL0tCL21pc2NjdHJsL2dyaWRjdHJsLmFzcHgiPk1GQyBHcmlkIGNvbnRyb2wgMi4yNjwvYT48ZGl2IGNsYXNzPSJTbWFsbFRleHQiPkEgZnVsbHkgZmVhdHVyZWQgTUZDIGdyaWQgY29udHJvbCBmb3IgZGlzcGxheWluZyB0YWJ1bGFyIGRhdGEuIFRoZSBncmlkIGlzIGEgY3VzdG9tIGNvbnRyb2wgZGVyaXZlZCBmcm9tIENXbmQ8L2Rpdj48L2xpPjxsaT48YSBocmVmPSIvS0IvdGlwcy9TZWxmLWdlbmVyYXRpbmctY29kZS5hc3B4Ij5Qcm9ncmFtbWluZyBTZWxmLWdlbmVyYXRpbmcgQ29kZSBmb3IgV2luZG93cyBBcHBsaWNhdGlvbnM8L2E+PGRpdiBjbGFzcz0iU21hbGxUZXh0Ij5FeGVjdXRpbmcgVkMrKyBjb2RlcyBpbiBTVEFDSyBvciBIRUFQPC9kaXY+PC9saT48bGk+PGEgaHJlZj0iL0tCL2NzL0FzeW5jTWV0aG9kSW52b2NhdGlvbi5hc3B4Ij5Bc3luY2hyb25vdXMgTWV0aG9kIEludm9jYXRpb248L2E+PGRpdiBjbGFzcz0iU21hbGxUZXh0Ij5Ib3cgdG8gdXNlIC5ORVQgdG8gY2FsbCBtZXRob2RzIGluIGEgbm9uLWJsb2NraW5nIG1vZGUuPC9kaXY+PC9saT48bGk+PGEgaHJlZj0iL0tCL2dyYXBoaWNzL3plZGdyYXBoLmFzcHgiPkEgZmxleGlibGUgY2hhcnRpbmcgbGlicmFyeSBmb3IgLk5FVDwvYT48ZGl2IGNsYXNzPSJTbWFsbFRleHQiPkxvb2tpbmcgZm9yIGEgd2F5IHRvIGRyYXcgMkQgbGluZSBncmFwaHMgd2l0aCBDIz8gSGVyZSdzIHlldCBhbm90aGVyIGNoYXJ0aW5nIGNsYXNzIGxpYnJhcnkgd2l0aCBhIGhpZ2ggZGVncmVlIG9mIGNvbmZpZ3VyYWJpbGl0eSwgdGhhdCBpcyBhbHNvIGVhc3kgdG8gdXNlLjwvZGl2PjwvbGk+PC91bD5kAgkPDxYCHwBnZGQCDQ8WAh8EBRVBcnRpY2xlVW5lZGl0ZWRIZWFkZXJkAhsPDxYCHwBnZGQCHQ8PFgIfAGdkZAIlDxYCHwBoZAIJDw8WAh8CBScvc2NyaXB0L0FydGljbGVzL0FydGljbGUuYXNweD9haWQ9MTczNzRkZAIPDxYCHwYFCzI5IEphbiAyMDA3ZAIRDw8WBB8GBQ1TZWFuIEV3aW5ndG9uHwIFLC9zY3JpcHQvTWVtYmVyc2hpcC9Qcm9maWxlcy5hc3B4P21pZD0zODczODcxZGQCEw8WAh8GBRhDb3B5cmlnaHQgMjAwNyBieSBBbmR5MzJkZEzla1BuIGHk/0Eh/X9GQod9jasV" type="hidden">
</div>

<div>

	<input name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCALis/v9CwLAlMXDBwLBlMXDBwLClMXDBwLDlMXDBwLElMXDBwLP+++tCwK5upDkC86BAjqkZE2VPtGFeSHgig0c5oB6" type="hidden">
</div>

	
	<h2>License</h2>
	<div id="ctl00_LicenseTerms"><p>This article, along with any associated source code and files, is licensed under <a href="http://www.codeproject.com/info/cpol10.aspx">The Code Project Open License (CPOL)</a></p></div>
	
	<h2>About the Author</h2>
	
			
            
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tbody><tr valign="top">
<td id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhotoTable" style="width: 155px;" valign="top">
	<b><a id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberProfileLink" href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></b><br><br>
	<center><img id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberPhoto" src="Gradient%20ColumnHeader_files/4BBCD906-6DAD-4443-8F0B-525208645B30.jpg" style="border-width: 0px;"></center><br>
	<span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberType" class="SmallText"></span>
		
</td>

<td>
	<br>	

	<table>
	<tbody><tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_jobTitleRow">
	<td class="SmallText" nowrap="nowrap">Occupation: </td>
	<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberJobTitle" class="SmallText">Web Developer</span></td>
</tr>


	

	<tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_locationRow">
	<td class="SmallText">Location: </td>
	<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberLocation" class="SmallText"><img src="Gradient%20ColumnHeader_files/BE.gif" alt="Belgium" width="16" height="11"> Belgium</span></td>
</tr>

	</tbody></table>
	
</td>
</tr>
</tbody></table>

			<br>
		
	
	<table width="100%" border="0" cellpadding="0" cellspacing="0">	
	<tbody><tr valign="top">			
		<td style="width: 100%;">
			<h2>Other popular Applications &amp; Tools articles:</h2><ul><li><a href="http://www.codeproject.com/KB/applications/todolist2.aspx">ToDoList 5.7.2 - A simple but effective way to keep on top of your tasks</a><div class="SmallText">A hierarchical task manager with native XML support for custom reporting.</div></li><li><a href="http://www.codeproject.com/KB/miscctrl/gridctrl.aspx">MFC Grid control 2.26</a><div class="SmallText">A fully featured MFC grid control for displaying tabular data. The grid is a custom control derived from CWnd</div></li><li><a href="http://www.codeproject.com/KB/tips/Self-generating-code.aspx">Programming Self-generating Code for Windows Applications</a><div class="SmallText">Executing VC++ codes in STACK or HEAP</div></li><li><a href="http://www.codeproject.com/KB/cs/AsyncMethodInvocation.aspx">Asynchronous Method Invocation</a><div class="SmallText">How to use .NET to call methods in a non-blocking mode.</div></li><li><a href="http://www.codeproject.com/KB/graphics/zedgraph.aspx">A flexible charting library for .NET</a><div class="SmallText">Looking
for a way to draw 2D line graphs with C#? Here's yet another charting
class library with a high degree of configurability, that is also easy
to use.</div></li></ul>
		</td>
		<td>
			<script type="text/javascript">document.write(unescape("%3ca%20href%3d%22http%3a%2f%2fwww.codeproject.com%2fRedir.aspx%3fadid%3d8672%26way%3dban%22%20target%3d%22_blank%22%20rel%3d%22nofollow%22%3e%3cimg%20src%3d%22http%3a%2f%2fwww.codeproject.com%2fscript%2fAdm%2fServeImg.aspx%3fFile%3d%252fscript%252fAdm%252fimages%252f20082-300x250.png%26C%3dFalse%26adid%3d8672%22%20alt%3d%22%22%20border%3d%220%22%20width%3d%22300%22%20height%3d%22250%22%3e%3c%2fa%3e"));</script><a href="http://www.codeproject.com/Redir.aspx?adid=8672&amp;way=ban" target="_blank" rel="nofollow"><img src="Gradient%20ColumnHeader_files/ServeImg_002.htm" alt="" width="300" border="0" height="250"></a>
									 
		</td>
	</tr>
	</tbody></table>

	<table id="ctl00_RateArticleRow" class="ArticleUneditedHeader" width="100%" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr>
		<td><a href="#_top">Article Top</a></td>
		<td align="right">            
<table width="100%" cellpadding="0" cellspacing="0"><tbody><tr>

	<td id="ctl00_RateArticle_VoteResultDiv" width="100%" align="right" nowrap="nowrap">
		<span id="voteRes"></span>
		<img id="loaderImg" alt="loading..." src="Gradient%20ColumnHeader_files/ajax-loader.gif" style="display: none;" width="16" height="16"> 
	</td>
		
	
	<td id="voteTbl" style="white-space: nowrap;" class="SmallText" align="right">
	
		<table><tbody><tr>
		
		<td id="ctl00_RateArticle_RateText" style="padding-right: 5px; white-space: nowrap;"><i><b>Rate this Article for us!</b></i></td>
		
		<td id="ctl00_RateArticle_StartForm" align="right"><i>&nbsp;&nbsp;Poor</i></td>
		
		<td id="ctl00_RateArticle_VoteFormDiv" style="white-space: nowrap;" align="left">
		<table id="ctl00_RateArticle_VoteRBL" border="0">
			<tbody><tr>
				<td><input id="ctl00_RateArticle_VoteRBL_0" name="ctl00$RateArticle$VoteRBL" value="1" onclick="ChkRt(1);" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_1" name="ctl00$RateArticle$VoteRBL" value="2" onclick="ChkRt(2);" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_2" name="ctl00$RateArticle$VoteRBL" value="3" onclick="ChkRt(3);" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_3" name="ctl00$RateArticle$VoteRBL" value="4" onclick="ChkRt(4);" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_4" name="ctl00$RateArticle$VoteRBL" value="5" onclick="ChkRt(5);" type="radio"></td>
			</tr>
		</tbody></table> 
		</td>
		
		<td id="ctl00_RateArticle_EndForm" align="left" nowrap="nowrap"><i>Excellent</i>
			<input name="ctl00$RateArticle$SubmitRateBtn" value="Vote" onclick="return rateItem(17374,2,true);" id="ctl00_RateArticle_SubmitRateBtn" class="FormButton" type="submit"> 
		</td>
		
		<td><span id="ctl00_RateArticle_ErrorMessage"></span></td>
		</tr></tbody></table>
		
	</td>
</tr></tbody></table>

<div id="RateComDiv" style="display: none;">
<table width="100%"><tbody><tr valign="top"><td width="100%" align="right">Your reason for this vote:</td>
<td><textarea id="RateComment" rows="5" cols="60" style="width: 285px; float: right;"></textarea>
</td></tr></tbody></table></div>



</td>
	</tr>
</tbody></table>

	</form>
	
	<div style="overflow: hidden; margin-left: 40px; white-space: nowrap;">
		<iframe src="Gradient%20ColumnHeader_files/ServeHTML_003.htm" scrolling="no" width="468" frameborder="0" height="60"></iframe>
		<iframe src="Gradient%20ColumnHeader_files/ServeLinks.htm" scrolling="no" width="300" frameborder="0" height="60"></iframe>
			  
			
		 
	</div>

	<a name="_comments"></a><!-- Forum Start -->
<div id="_MessageBoard" onclick="return SwitchMessage(event, null)">
	<table id="ForumTable" class="Frm_MainTable" cellpadding="0" cellspacing="0">
		<tbody><tr>
			<td><form action="/script/Forums/SetOptions.aspx?floc=%2fKB%2fvb%2fGradientColumnheader.aspx&amp;fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick" method="get" style="margin: 0pt; padding: 0pt;">
				<input name="fid" value="380082" type="hidden"><input name="currentQS" value="?floc=%2fKB%2fvb%2fGradientColumnheader.aspx&amp;fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick" type="hidden"><input name="floc" value="/KB/vb/GradientColumnheader.aspx" type="hidden"><table width="100%" border="0" cellpadding="3" cellspacing="0">
					<tbody><tr class="Frm_HeaderRow1">
						<td style="white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/forum_faq.gif" alt="FAQ" width="16" align="middle" border="0" height="16">&nbsp;<a href="http://www.codeproject.com/script/Forums/FAQ.aspx"><b>FAQ</b></a>&nbsp;</td><td style="white-space: nowrap; text-align: right;">Noise Tolerance<select size="1" class="Frm_DropDown" name="noise">
							<option value="1">Very High</option><option value="2">High</option><option selected="selected" value="3">Medium</option><option value="4">Low</option><option value="5">Very Low</option>
						</select></td><td colspan="2" style="white-space: nowrap; text-align: right;"><img src="Gradient%20ColumnHeader_files/forum_search.gif" alt="Search" width="16" align="top" border="0" height="15">&nbsp;<a href="http://www.codeproject.com/script/Forums/Search.aspx?fid=380082">Search Messages</a>&nbsp;</td><td style="text-align: right;"><input value="Set Options" name="SetOpt" class="Frm_Button" type="submit"></td>
					</tr><tr class="Frm_HeaderRow2">
						<td style="width: 100%;">&nbsp;</td><td style="white-space: nowrap; text-align: right;">Layout<select size="1" class="Frm_DropDown" name="view">
							<option selected="selected" value="Quick">Normal</option><option value="Topic">Expand Root Messages</option><option value="Expanded">Expand All Messages</option><option value="Thread">Thread View</option><option value="Normal">No Javascript (slow)</option><option value="Preview">No Javascript Preview</option>
						</select>&nbsp;&nbsp;</td><td style="white-space: nowrap;">Per page<select size="1" class="Frm_DropDown" name="mpp">
							<option value="10">10</option><option selected="selected" value="25">25</option><option value="50">50</option>
						</select>&nbsp;&nbsp;</td><td colspan="2">&nbsp;</td>
					</tr>
				</tbody></table>
			</form></td>
		</tr><tr>
			<td><a name="xx0xx"></a><table width="100%" border="0" cellpadding="2" cellspacing="0">
				<tbody><tr class="Frm_NavigationBar">
					<td><img src="Gradient%20ColumnHeader_files/forum_newmsg.gif" alt="new" width="16" align="top" border="0" height="16"><a href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;floc=/KB/vb/GradientColumnheader.aspx" class="Frm_HL" name="Frm_HoverNL" title="Create a new message thread" target="_top"><b>New Message</b></a></td><td>Msgs 1 to 13 of 13 (Total in Forum: 13) (<a href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick">Refresh</a>)</td><td style="text-align: right; white-space: nowrap;"><span class="Frm_HL">First</span><span class="Frm_HL">Prev</span><span class="Frm_HL">Next</span></td>
				</tr>
			</tbody></table></td>
		</tr><tr>
			<td><table class="Frm_MsgTable" width="100%" border="0" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<td><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="5"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd Rt HdUnSel" id="F2725967_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx2725967xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2725967" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2725967#xx2725967xx">Suggestion</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=34934">GlimmerMan</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">16:55 16 Sep '08 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2725967_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">As
coded flipping "Option strict" on will not allow the project to
compile. My suggestion is rework your code so that it works with
"Option strict" on. Otherwise nicely done. <img src="Gradient%20ColumnHeader_files/smiley_smile.gif" alt="Smile" align="top"> <br><br><div class="ForumSig">Kevin S. Gallagher<br>Programming is an art form that fights back</div><br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2725967&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2725967&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2725967" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2725967" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2725967&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2725967" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(34934,2725967,false,"","","");
											</script>Rate this message: <a href="#xx2725967xx" onclick="RateMsg(34934, 2725967,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2725967xx" title="vote this message a 1" onclick="RateMsg(34934, 2725967, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2725967xx" title="vote this message a 2" onclick="RateMsg(34934, 2725967, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2725967xx" title="vote this message a 3" onclick="RateMsg(34934, 2725967, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2725967xx" title="vote this message a 4" onclick="RateMsg(34934, 2725967, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2725967xx" title="vote this message a 5" onclick="RateMsg(34934, 2725967, 5,0)"><b>5</b></a> <a href="#xx2725967xx" onclick="RateMsg(34934, 2725967,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2725967xx" title="Report as Abuse" onclick="return ReportMsg(34934
, 2725967,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd Rt HdUnSel" id="F2347992_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx2347992xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2347992" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2347992#xx2347992xx">Link to sample code</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2490725">Hector Pacheco</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">5:19 6 Dec '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2347992_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">can you re-post the source code for the example <br>thanks <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2347992&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2347992&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2347992" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2347992" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2347992&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2347992" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2490725,2347992,false,"","","");
											</script>Rate this message: <a href="#xx2347992xx" onclick="RateMsg(2490725, 2347992,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2347992xx" title="vote this message a 1" onclick="RateMsg(2490725, 2347992, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2347992xx" title="vote this message a 2" onclick="RateMsg(2490725, 2347992, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2347992xx" title="vote this message a 3" onclick="RateMsg(2490725, 2347992, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2347992xx" title="vote this message a 4" onclick="RateMsg(2490725, 2347992, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2347992xx" title="vote this message a 5" onclick="RateMsg(2490725, 2347992, 5,0)"><b>5</b></a> <a href="#xx2347992xx" onclick="RateMsg(2490725, 2347992,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2347992xx" title="Report as Abuse" onclick="return ReportMsg(2490725
, 2347992,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd Rt HdUnSel" id="F2132418_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx2132418xx"></a><img src="Gradient%20ColumnHeader_files/msg_question.gif" alt="Question" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2132418" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2132418#xx2132418xx">TekenAchtergrond</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=3085596">Muhmmad saqib</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">15:02 16 Jul '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2132418_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Thanks for sharing your code! I was looking for a way to draw image at design time.<br>And i figure out that if u use <br><br>g.DrawImage(obj, r.X, r.Y, r.Width, r.Height)<br><br>insted of all IF and Else block in "TekenAchtergrond" method, it still working fine<br>Pls, tell me the resion of this complete IF and Else block <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2132418&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2132418&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2132418" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2132418" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2132418&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2132418" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(3085596,2132418,false,"","","");
											</script>Rate this message: <a href="#xx2132418xx" onclick="RateMsg(3085596, 2132418,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2132418xx" title="vote this message a 1" onclick="RateMsg(3085596, 2132418, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2132418xx" title="vote this message a 2" onclick="RateMsg(3085596, 2132418, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2132418xx" title="vote this message a 3" onclick="RateMsg(3085596, 2132418, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2132418xx" title="vote this message a 4" onclick="RateMsg(3085596, 2132418, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2132418xx" title="vote this message a 5" onclick="RateMsg(3085596, 2132418, 5,0)"><b>5</b></a> <a href="#xx2132418xx" onclick="RateMsg(3085596, 2132418,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2132418xx" title="Report as Abuse" onclick="return ReportMsg(3085596
, 2132418,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HdUnSel" id="F2133451_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="34"><a name="xx2133451xx"></a><img src="Gradient%20ColumnHeader_files/msg_answer.gif" alt="Answer" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2133451" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2133451#xx2133451xx">Re: TekenAchtergrond</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">0:41 17 Jul '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2133451_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 34px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="34" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Reason
has to do with getting the right measurements of the background. Also,
I had some troubles getting the divider line visible. With the if else
block, I managed to do that. Do you also have visualibility of the
divider lines with your code ?<img src="Gradient%20ColumnHeader_files/smiley_OMG.gif" alt="OMG" align="top"> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2133451&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2133451&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2132418" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2133451" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2133451&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2133451" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2959992,2133451,false,"","","");
											</script>Rate this message: <a href="#xx2133451xx" onclick="RateMsg(2959992, 2133451,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2133451xx" title="vote this message a 1" onclick="RateMsg(2959992, 2133451, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2133451xx" title="vote this message a 2" onclick="RateMsg(2959992, 2133451, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2133451xx" title="vote this message a 3" onclick="RateMsg(2959992, 2133451, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2133451xx" title="vote this message a 4" onclick="RateMsg(2959992, 2133451, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2133451xx" title="vote this message a 5" onclick="RateMsg(2959992, 2133451, 5,0)"><b>5</b></a> <a href="#xx2133451xx" onclick="RateMsg(2959992, 2133451,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2133451xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 2133451,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HdUnSel" id="F2133711_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="52"><a name="xx2133711xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2133711" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2133711#xx2133711xx">Re: TekenAchtergrond</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=3085596">Muhmmad saqib</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">8:02 17 Jul '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2133711_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 52px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="52" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Yes divider line is visible and i dont face any ploblem while measuring the <br>background Rectangle of the column. <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2133711&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2133711&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2132418" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2133711" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2133711&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2133711" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(3085596,2133711,false,"","","");
											</script>Rate this message: <a href="#xx2133711xx" onclick="RateMsg(3085596, 2133711,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2133711xx" title="vote this message a 1" onclick="RateMsg(3085596, 2133711, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2133711xx" title="vote this message a 2" onclick="RateMsg(3085596, 2133711, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2133711xx" title="vote this message a 3" onclick="RateMsg(3085596, 2133711, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2133711xx" title="vote this message a 4" onclick="RateMsg(3085596, 2133711, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2133711xx" title="vote this message a 5" onclick="RateMsg(3085596, 2133711, 5,0)"><b>5</b></a> <a href="#xx2133711xx" onclick="RateMsg(3085596, 2133711,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2133711xx" title="Report as Abuse" onclick="return ReportMsg(3085596
, 2133711,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HdUnSel" id="F2134019_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="70"><a name="xx2134019xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2134019" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=2134019#xx2134019xx">Re: TekenAchtergrond</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">11:35 17 Jul '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F2134019_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 70px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="70" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">OK, thanks for the reply, i'm gonna try this, saves me coding space. <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2134019&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=2134019&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=2132418" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=2134019" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=2134019&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2134019" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2959992,2134019,false,"","","");
											</script>Rate this message: <a href="#xx2134019xx" onclick="RateMsg(2959992, 2134019,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx2134019xx" title="vote this message a 1" onclick="RateMsg(2959992, 2134019, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx2134019xx" title="vote this message a 2" onclick="RateMsg(2959992, 2134019, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx2134019xx" title="vote this message a 3" onclick="RateMsg(2959992, 2134019, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx2134019xx" title="vote this message a 4" onclick="RateMsg(2959992, 2134019, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx2134019xx" title="vote this message a 5" onclick="RateMsg(2959992, 2134019, 5,0)"><b>5</b></a> <a href="#xx2134019xx" onclick="RateMsg(2959992, 2134019,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx2134019xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 2134019,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HiVote Rt HdUnSel" id="F1927329_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx1927329xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1927329" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1927329#xx1927329xx">Gradient Fill Brush</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2878444">revox12345</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">9:52 7 Mar '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1927329_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Thanks
for sharing your code! I was looking for a way to do this with a
gradient brush, and this code put me on the right track. After messin
with it a bit here is what I came up with in case anyone else trying to
pull this off without an image file.<br><br><code><br> Private Sub
DataGridView1_CellPainting(ByVal sender As Object, ByVal e As
System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles
DataGridView1.CellPainting<br>        If e.RowIndex = -1 Then<br>            Dim rect As New Rectangle(0, 0, e.CellBounds.Width, e.CellBounds.Height)<br>
Dim brush As LinearGradientBrush = New LinearGradientBrush(rect,
Color.FromArgb(255, 255, 255), Color.FromArgb(209, 218, 233),
LinearGradientMode.Vertical)<br>            e.Graphics.FillRectangle(brush, e.CellBounds)<br>            Dim parts As DataGridViewPaintParts = DataGridViewPaintParts.All And Not DataGridViewPaintParts.Background<br>            e.Paint(e.ClipBounds, parts)<br>            e.Handled = True<br>        End If<br>    End Sub<br><br></code> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1927329&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1927329&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1927329" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1927329" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1927329&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1927329" style="white-space: nowrap;">5.00/5 (1 vote) <script type="text/javascript">
												MsgVFrm(2878444,1927329,false,"","","");
											</script>Rate this message: <a href="#xx1927329xx" onclick="RateMsg(2878444, 1927329,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1927329xx" title="vote this message a 1" onclick="RateMsg(2878444, 1927329, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1927329xx" title="vote this message a 2" onclick="RateMsg(2878444, 1927329, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1927329xx" title="vote this message a 3" onclick="RateMsg(2878444, 1927329, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1927329xx" title="vote this message a 4" onclick="RateMsg(2878444, 1927329, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1927329xx" title="vote this message a 5" onclick="RateMsg(2878444, 1927329, 5,0)"><b>5</b></a> <a href="#xx1927329xx" onclick="RateMsg(2878444, 1927329,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1927329xx" title="Report as Abuse" onclick="return ReportMsg(2878444
, 1927329,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HdUnSel" id="F1928496_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="34"><a name="xx1928496xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1928496" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1928496#xx1928496xx">Re: Gradient Fill Brush</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">20:34 7 Mar '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1928496_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 34px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="34" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Sharing code is what we're here for <img src="Gradient%20ColumnHeader_files/smiley_laugh.gif" alt="Laugh" align="top"><br>Thanks
for doing the same, I looked at your code, works fine and it is more
performant than the image thing. Combined minds always improve the
results <img src="Gradient%20ColumnHeader_files/smiley_smile.gif" alt="Smile" align="top"> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1928496&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1928496&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1927329" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1928496" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1928496&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1928496" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2959992,1928496,false,"","","");
											</script>Rate this message: <a href="#xx1928496xx" onclick="RateMsg(2959992, 1928496,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1928496xx" title="vote this message a 1" onclick="RateMsg(2959992, 1928496, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1928496xx" title="vote this message a 2" onclick="RateMsg(2959992, 1928496, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1928496xx" title="vote this message a 3" onclick="RateMsg(2959992, 1928496, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1928496xx" title="vote this message a 4" onclick="RateMsg(2959992, 1928496, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1928496xx" title="vote this message a 5" onclick="RateMsg(2959992, 1928496, 5,0)"><b>5</b></a> <a href="#xx1928496xx" onclick="RateMsg(2959992, 1928496,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1928496xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 1928496,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd Rt HdUnSel" id="F1869225_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx1869225xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1869225" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1869225#xx1869225xx">Using DataGridViewCellPaintingEventArgs.PaintContent</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=44777">Markri</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">3:45 31 Jan '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1869225_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">I
like the new gradient! Instead of painting your own text using
DrawString I recommend using the event args class that is included with
the CellPainting event:<br><code><br>Private Sub DataGridView1_CellPainting(ByVal sender As Object,<br>     ByVal e As DataGridViewCellPaintingEventArgs) Handles<br>      DataGridView1.CellPainting<br><br>If e.RowIndex = -1 Then<br><br>    Dim img As Image<br><br>    img = My.Resources.Header<br><br>    TekenAchtergrond(e.Graphics, img, e.CellBounds, 1)<br>    e.PaintContent(e.CellBounds)<br>....<br></code><br>Edit: Note the PaintContent also paints the sorting glyph by default.<br><br>-mark<br> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1869225&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1869225&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1869225" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1869225" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1869225&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1869225" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(44777,1869225,false,"","","");
											</script>Rate this message: <a href="#xx1869225xx" onclick="RateMsg(44777, 1869225,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1869225xx" title="vote this message a 1" onclick="RateMsg(44777, 1869225, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1869225xx" title="vote this message a 2" onclick="RateMsg(44777, 1869225, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1869225xx" title="vote this message a 3" onclick="RateMsg(44777, 1869225, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1869225xx" title="vote this message a 4" onclick="RateMsg(44777, 1869225, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1869225xx" title="vote this message a 5" onclick="RateMsg(44777, 1869225, 5,0)"><b>5</b></a> <a href="#xx1869225xx" onclick="RateMsg(44777, 1869225,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1869225xx" title="Report as Abuse" onclick="return ReportMsg(44777
, 1869225,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HdUnSel" id="F1873362_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="34"><a name="xx1873362xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1873362" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1873362#xx1873362xx">Re: Using DataGridViewCellPaintingEventArgs.PaintContent</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">1:32 2 Feb '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1873362_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 34px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="34" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Thx
for the tip, I just started developping 2 years ago, (before that I was
an accountant) so I never had any lesson or education on .net or any
other language, but thanks to the many examples in this site and msdn I
found my way. Therefor, it's always nice to catch a good tip <img src="Gradient%20ColumnHeader_files/smiley_wink.gif" alt="Wink" align="top"> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1873362&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1873362&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1869225" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1873362" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1873362&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1873362" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2959992,1873362,false,"","","");
											</script>Rate this message: <a href="#xx1873362xx" onclick="RateMsg(2959992, 1873362,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1873362xx" title="vote this message a 1" onclick="RateMsg(2959992, 1873362, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1873362xx" title="vote this message a 2" onclick="RateMsg(2959992, 1873362, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1873362xx" title="vote this message a 3" onclick="RateMsg(2959992, 1873362, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1873362xx" title="vote this message a 4" onclick="RateMsg(2959992, 1873362, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1873362xx" title="vote this message a 5" onclick="RateMsg(2959992, 1873362, 5,0)"><b>5</b></a> <a href="#xx1873362xx" onclick="RateMsg(2959992, 1873362,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1873362xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 1873362,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd Rt HdUnSel" id="F1866175_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx1866175xx"></a><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1866175" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1866175#xx1866175xx">Bad download link</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">14:07 29 Jan '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1866175_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Hi,<br><br>I'm
sorry about that, I first posted the article and then figured I had to
mention the other article which helped me finding a solution. I guess
there has been some mixup when I added the second link. I changed the
article again and fixed the downloadlink. Sorry for the mistake.<br><br>Regards,<br>Andy <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1866175&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1866175&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1866175" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1866175" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1866175&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1866175" style="white-space: nowrap;"><script type="text/javascript">
												MsgVFrm(2959992,1866175,false,"","","");
											</script>Rate this message: <a href="#xx1866175xx" onclick="RateMsg(2959992, 1866175,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1866175xx" title="vote this message a 1" onclick="RateMsg(2959992, 1866175, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1866175xx" title="vote this message a 2" onclick="RateMsg(2959992, 1866175, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1866175xx" title="vote this message a 3" onclick="RateMsg(2959992, 1866175, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1866175xx" title="vote this message a 4" onclick="RateMsg(2959992, 1866175, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1866175xx" title="vote this message a 5" onclick="RateMsg(2959992, 1866175, 5,0)"><b>5</b></a> <a href="#xx1866175xx" onclick="RateMsg(2959992, 1866175,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1866175xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 1866175,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgRtDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HiVote Rt HdUnSel" id="F1865667_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="16"><a name="xx1865667xx"></a><img src="Gradient%20ColumnHeader_files/msg_question.gif" alt="Question" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1865667" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1865667#xx1865667xx">Bad download link</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=286026">UnRusoDeCaracas</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">5:52 29 Jan '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1865667_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 16px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="16" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">The download source link redirects to another article in cp ..<img src="Gradient%20ColumnHeader_files/smiley_confused.gif" alt="Confused" align="top"> <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1865667&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1865667&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1865667" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1865667" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1865667&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1865667" style="white-space: nowrap;">5.00/5 (1 vote) <script type="text/javascript">
												MsgVFrm(286026,1865667,false,"","","");
											</script>Rate this message: <a href="#xx1865667xx" onclick="RateMsg(286026, 1865667,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1865667xx" title="vote this message a 1" onclick="RateMsg(286026, 1865667, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1865667xx" title="vote this message a 2" onclick="RateMsg(286026, 1865667, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1865667xx" title="vote this message a 3" onclick="RateMsg(286026, 1865667, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1865667xx" title="vote this message a 4" onclick="RateMsg(286026, 1865667, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1865667xx" title="vote this message a 5" onclick="RateMsg(286026, 1865667, 5,0)"><b>5</b></a> <a href="#xx1865667xx" onclick="RateMsg(286026, 1865667,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1865667xx" title="Report as Abuse" onclick="return ReportMsg(286026
, 1865667,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr class="Quick">
					<td class="Frm_MsgDivide"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="1"></td>
				</tr>
<!-- Start Message head -->

				<tr class="MsgHd HiVote HdUnSel" id="F1866178_h0">
					<td width="100%"><table class="QuickHd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" width="34"><a name="xx1866178xx"></a><img src="Gradient%20ColumnHeader_files/msg_answer.gif" alt="Answer" width="16" align="top" height="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="1866178" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;select=1866178#xx1866178xx">Re: Bad download link</a></td><td style="width: 20px; white-space: nowrap;"><img src="Gradient%20ColumnHeader_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2959992">Andy32</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">14:09 29 Jan '07 &nbsp;</td>
						</tr>
					</tbody></table></td>
				</tr><!-- End Message head -->

				<tr id="F1866178_h1" style="display: none;">
					<td width="100%"><table class="QuickBd" width="100%" border="0" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<td class="Frm_MsgIndent" style="width: 34px;"><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="34" height="1"></td><td class="MsgBd BdSel"><table width="100%" border="0" cellpadding="0" cellspacing="5">
								<tbody><tr>
									<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
										<tbody><tr>
											<td colspan="2">Sorry  about that - i fixed it so you can have another look.<br><br>Regards,<br>Andy <br></td>
										</tr><tr style="vertical-align: middle;">
											<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1866178&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=r" title="Reply">Reply</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=380082&amp;select=1866178&amp;floc=/KB/vb/GradientColumnheader.aspx&amp;fa=e" title="Email">Email</a>·<a class="Frm_MHL" href="http://www.codeproject.com/KB/vb/GradientColumnheader.aspx?fid=380082&amp;df=90&amp;mpp=25&amp;sort=Position&amp;tid=1865667" title="View Thread">View Thread</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=380082&amp;msg=1866178" title="Get permanent link">PermaLink</a>·<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?obid=1866178&amp;obtid=3&amp;bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF1866178" style="white-space: nowrap;">5.00/5 (1 vote) <script type="text/javascript">
												MsgVFrm(2959992,1866178,false,"","","");
											</script>Rate this message: <a href="#xx1866178xx" onclick="RateMsg(2959992, 1866178,1,0);"><img src="Gradient%20ColumnHeader_files/thumbs_down.gif" alt="vote 1" width="14" align="middle" border="0" height="14"></a> <a class="Frm_MHL" href="#xx1866178xx" title="vote this message a 1" onclick="RateMsg(2959992, 1866178, 1,0)"><b>1</b></a> <a class="Frm_MHL" href="#xx1866178xx" title="vote this message a 2" onclick="RateMsg(2959992, 1866178, 2,0)"><b>2</b></a> <a class="Frm_MHL" href="#xx1866178xx" title="vote this message a 3" onclick="RateMsg(2959992, 1866178, 3,0)"><b>3</b></a> <a class="Frm_MHL" href="#xx1866178xx" title="vote this message a 4" onclick="RateMsg(2959992, 1866178, 4,0)"><b>4</b></a> <a class="Frm_MHL" href="#xx1866178xx" title="vote this message a 5" onclick="RateMsg(2959992, 1866178, 5,0)"><b>5</b></a> <a href="#xx1866178xx" onclick="RateMsg(2959992, 1866178,5,0);"><img src="Gradient%20ColumnHeader_files/thumbs_up.gif" alt="vote 5" width="14" align="middle" border="0" height="14"></a> <br>[<a href="#xx1866178xx" title="Report as Abuse" onclick="return ReportMsg(2959992
, 1866178,-2)">Vote to Remove Message</a>]
</span></td>
										</tr>
									</tbody></table></td>
								</tr>
							</tbody></table></td>
						</tr>
					</tbody></table></td>
				</tr><tr>
					<td><img src="Gradient%20ColumnHeader_files/t_002.gif" alt="" width="1" border="0" height="5"></td>
				</tr>
			</tbody></table></td>
		</tr><tr>
			<td><table width="100%" cellpadding="2" cellspacing="0">
				<tbody><tr class="Frm_Footer">
					<td>Last Visit: 11:50 4 Mar '09  &nbsp; &nbsp; Last Update: 10:39 5 Mar '09 </td><td style="text-align: right; white-space: nowrap;"></td>
				</tr>
			</tbody></table></td>
		</tr>
	</tbody></table>
</div><p class="SmallText"><img src="Gradient%20ColumnHeader_files/msg_general.gif" alt="General" width="16" align="top" height="16"> General &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_news.gif" alt="News" width="16" align="top" height="16"> News &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_question.gif" alt="Question" width="16" align="top" height="16"> Question &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_answer.gif" alt="Answer" width="16" align="top" height="16"> Answer &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_joke.gif" alt="Joke" width="16" align="top" height="16"> Joke &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_rant.gif" alt="Rant" width="16" align="top" height="16"> Rant &nbsp;&nbsp; <img src="Gradient%20ColumnHeader_files/msg_admin.gif" alt="Admin" width="16" align="top" height="16"> Admin &nbsp;&nbsp; </p>
<!-- Forum End -->




	
	</div>
	
	<table width="100%">
	<tbody><tr valign="top">
		<td class="TinyText" align="left">
		    <a id="ctl00_PermaLink" href="http://www.codeproject.com/script/Articles/Article.aspx?aid=17374">PermaLink</a> | 
			<a id="ctl00_PrivacyLink" href="http://www.codeproject.com/info/privacy.aspx">Privacy</a> |
			<a id="ctl00_TermsOfUseLink" href="http://www.codeproject.com/info/TermsOfUse.aspx">Terms of Use</a>
			<br>Last Updated: 29 Jan 2007<br>
			Editor: <a id="ctl00_ArticleEditor" href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=3873871">Sean Ewington</a><br>
		</td>
		<td class="TinyText" valign="top" align="right">
			Copyright 2007 by Andy32<br>Everything else
			Copyright © <a href="mailto:webmaster@codeproject.com">CodeProject</a>, 1999-2009 <br>
			Web18 |
			<a id="ctl00_AdvertiseLink" href="http://www.codeproject.com/info/MediaKit.aspx">Advertise on the Code Project </a>
		</td>
	</tr>
	
	</tbody></table>
	
	<center>
		
	</center>

</div>
</div>	
	
<div>


</div>

<br>
<script type="text/javascript" language="Javascript">//<![CDATA[
if (document.all) try {window.attachEvent("oncopy",copyCode);}catch(e){};
//]]></script>

<script type="text/javascript" language="Javascript" src="Gradient%20ColumnHeader_files/TogglePre.js"></script>
<script type="text/javascript" language="Javascript">//<![CDATA[
$(document).ready(function() {RetrieveJobsSummary('Th',17374,2,108,"65,83,162,179,94,12,39,144,184,118,153");});
//]]></script>


</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 (Senior)
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions