# C1.C1Excel.C1XLBook.TwipsToPixels

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Excel_C1XLBook_TwipsToPixels_" data-uid="C1.C1Excel.C1XLBook.TwipsToPixels*">TwipsToPixels Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Excel_C1XLBook_TwipsToPixels_" data-uid="C1.C1Excel.C1XLBook.TwipsToPixels*"></a>
<h4 id="C1_C1Excel_C1XLBook_TwipsToPixels_System_Double_" data-uid="C1.C1Excel.C1XLBook.TwipsToPixels(System.Double)">TwipsToPixels(double)</h4>
<div class="markdown level1 summary"><p>Converts a twips measurement into screen pixels.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static int TwipsToPixels(double twip)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function TwipsToPixels(twip As Double) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">twip</span></td>
      <td><p>Measurement in twips.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>Measurement in screen pixels.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Excel_C1XLBook_TwipsToPixels_System_Double__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Excel stores measurements in twips (1/20th of a point), 
a resolution-independent unit. .NET controls, on the other hand, 
usually express measurements in pixels. This method provides an 
easy way to convert pixel measurements into twips using the 
current screen resolution.</p>
<p><a class="xref" href="C1.C1Excel.C1XLBook.PixelsToTwips.html#C1_C1Excel_C1XLBook_PixelsToTwips_System_Double_">PixelsToTwips(double)</a></p>
</div>
</div>
