# C1.Win.TouchToolKit.C1Zoom.GetDisplayRectangle

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TouchToolKit_C1Zoom_GetDisplayRectangle_" data-uid="C1.Win.TouchToolKit.C1Zoom.GetDisplayRectangle*">GetDisplayRectangle Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TouchToolKit_C1Zoom_GetDisplayRectangle_" data-uid="C1.Win.TouchToolKit.C1Zoom.GetDisplayRectangle*"></a>
<h4 id="C1_Win_TouchToolKit_C1Zoom_GetDisplayRectangle_System_Windows_Forms_Control_" data-uid="C1.Win.TouchToolKit.C1Zoom.GetDisplayRectangle(System.Windows.Forms.Control)">GetDisplayRectangle(Control)</h4>
<div class="markdown level1 summary"><p>Get control visibility rectangle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Rectangle GetDisplayRectangle(Control control)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetDisplayRectangle(control As Control) As Rectangle</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.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p>The target control</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.drawing.rectangle">Rectangle</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a> value that represents the control visibility area.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TouchToolKit_C1Zoom_GetDisplayRectangle_System_Windows_Forms_Control__examples">Examples</h5>
 <p>
   The following code example shows how to use this method.
 </p>
 <p>
   This code example is part of a larger example provided for the <a class="xref" href="C1.Win.TouchToolKit.C1Zoom.Controls.html#C1_Win_TouchToolKit_C1Zoom_Controls">Controls</a> property.
 </p>
 <pre><code class="lang-csharp">public class GcZoomControlsDemo : Form
 {
 	private GcZoom _gcZoom1 = new GcZoom();
 	private Button _getDisplayRectangleButton;

 	public GcZoomControlsDemo()
 	{
 		InitializeComponent();

 		_gcZoom1.Target = this;

 		_getDisplayRectangleButton.Click += _getDisplayRectangleButton_Click;
 	}

 	void _getDisplayRectangleButton_Click(object sender, EventArgs e)
 	{
 		Console.WriteLine(_gcZoom1.GetDisplayRectangle(_getDisplayRectangleButton).ToString());
 	}

 	private void InitializeComponent()
 	{
 		_getDisplayRectangleButton = new Button();
 		_getDisplayRectangleButton.Text = "GetDisplayRectangle";
 		_getDisplayRectangleButton.Location = new Point(20, 250);
 		_getDisplayRectangleButton.Size = new Size(120, 25);
 		this.Controls.Add(_getDisplayRectangleButton);
 	}
 }</code></pre>
<pre><code class="lang-csharp">Public Class GcZoomControlsDemo
	Inherits Form
	Private _gcZoom1 As New GcZoom()
	Private _getDisplayRectangleButton As Button

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _getDisplayRectangleButton.Click, AddressOf _getDisplayRectangleButton_Click
	End Sub

	Private Sub _getDisplayRectangleButton_Click(sender As Object, e As EventArgs)
		Console.WriteLine(_gcZoom1.GetDisplayRectangle(_getDisplayRectangleButton).ToString())
	End Sub

	Private Sub InitializeComponent()
		_getDisplayRectangleButton = New Button()
		_getDisplayRectangleButton.Text = "GetDisplayRectangle"
		_getDisplayRectangleButton.Location = New Point(20, 250)
		_getDisplayRectangleButton.Size = New Size(120, 25)
		Me.Controls.Add(_getDisplayRectangleButton)
	End Sub
End Class</code></pre>

</div>
