# C1ZoomCommandProvider Custom Action

Custom action   You can access the Form which hosts the ControlBar by using the C1ZoomCommandProvider.OwnerForm property. Use the following code to close the Form.

## Content



### Custom action

You can access the Form which hosts the ControlBar by using the <span data-popup-content="This property is available in \u003ca href=\u0022/componentone/docs/win/online-touchtoolkit/\u0022\u003e.NET Framework\u003c/a\u003e and .NET." data-popup-title="C1ZoomCommandProvider.OwnerForm" data-popup-theme="ui-tooltip-green qtip-green">C1ZoomCommandProvider.OwnerForm</span> property. Use the following code to close the Form.

```csharp
c1ZoomCommandProvider1.OwnerForm.Close();
```

```vbnet
C1ZoomCommandProvider1.OwnerForm.Close()
```

You can access the **C1Zoom** component which is in the Form by using the <span data-popup-content="This property is available in \u003ca href=\u0022/componentone/docs/win/online-touchtoolkit/\u0022\u003e.NET Framework\u003c/a\u003e and \u003ca href=\u0022/componentone/docs/win/online-touchtoolkit/\u0022\u003e.NET\u003c/a\u003e." data-popup-title="C1ZoomCommandProvider.OwnerGcZoom" data-popup-theme="ui-tooltip-green qtip-green">C1ZoomCommandProvider.OwnerGcZoom</span> property. Use the following code to scroll to the right-down direction.

```csharp
private void button1_Click(object sender, EventArgs e)
{
   C1ZoomCommandProvider c1ZoomCommandProvider1 = new C1ZoomCommandProvider();
   Point currentLocation = c1ZoomCommandProvider1.OwnerGcZoom.ScrollLocation;
   currentLocation.X -= 100;
   currentLocation.Y -= 100;
   c1ZoomCommandProvider1.OwnerGcZoom.ScrollLocation = currentLocation;
}
```

```vbnet
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim currentLocation As Point = C1ZoomCommandProvider1.OwnerGcZoom.ScrollLocation
    currentLocation.X -= 100
    currentLocation.Y -= 100
    C1ZoomCommandProvider1.OwnerGcZoom.ScrollLocation = currentLocation
End Sub
```