<html dir="LTR">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>ThemePaint.GetColor Method</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">Skybound VisualStyles</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">ThemePaint.GetColor Method </h1>
      </div>
    </div>
    <div id="nstext">
      <p> Returns a color defined by the active theme for a specified control that supports visual styles. </p>
      <div class="syntax">
        <span class="lang">[Visual Basic]</span>
        <br />Public Shared Function GetColor( _<br />   ByVal <i>control</i> As <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassTopic.asp">Control</a>, _<br />   ByVal <i>themeClass</i> As <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemStringClassTopic.asp">String</a>, _<br />   ByVal <i>themePart</i> As <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemInt32ClassTopic.asp">Integer</a>, _<br />   ByVal <i>themeState</i> As <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemInt32ClassTopic.asp">Integer</a>, _<br />   ByVal <i>color</i> As <a href="Skybound.VisualStyles.ThemeColor.html">ThemeColor</a> _<br />) As <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawingColorClassTopic.asp">Color</a></div>
      <div class="syntax">
        <span class="lang">[C#]</span>
        <br />public static <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawingColorClassTopic.asp">Color</a> GetColor(<br />   <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassTopic.asp">Control</a> <i>control</i>,<br />   <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemStringClassTopic.asp">string</a> <i>themeClass</i>,<br />   <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemInt32ClassTopic.asp">int</a> <i>themePart</i>,<br />   <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemInt32ClassTopic.asp">int</a> <i>themeState</i>,<br />   <a href="Skybound.VisualStyles.ThemeColor.html">ThemeColor</a> <i>color</i><br />);</div>
      <h4 class="dtH4">Parameters</h4>
      <dl>
        <dt>
          <i>control</i>
        </dt>
        <dd>The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassTopic.asp">Control</a> for which the color is returned.</dd>
        <dt>
          <i>themeClass</i>
        </dt>
        <dd>Specifies the class of control.</dd>
        <dt>
          <i>themePart</i>
        </dt>
        <dd>The ID of the part for which the color is returned.</dd>
        <dt>
          <i>themeState</i>
        </dt>
        <dd>The ID of the state for which the color is returned.</dd>
        <dt>
          <i>color</i>
        </dt>
        <dd>The color to retrieve.</dd>
      </dl>
      <h4 class="dtH4">Return Value</h4>
      <p>The color, or <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawingColorClassEmptyTopic.asp">Empty</a> if the color could not be obtained.</p>
      <h4 class="dtH4">See Also</h4>
      <p>
        <a href="Skybound.VisualStyles.ThemePaint.html">ThemePaint Class</a> | <a href="Skybound.VisualStyles.html">Skybound.VisualStyles Namespace</a></p>
      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="GetColor method">
        </param>
        <param name="Keyword" value="GetColor method, ThemePaint class">
        </param>
        <param name="Keyword" value="ThemePaint.GetColor method">
        </param>
      </object>
      <hr />
      <div id="footer"><a target="_top" href="http://www.skybound.ca/contact.aspx?Product=VisualStyles">Any questions?<p>© 2005 Skybound.  All Rights Reserved.</a><p></div>
    </div>
  </body>
</html>
