---
title: "How to reset user control by getting the value from other form"  
description: "How to reset user control by getting the value from other form"  
author: "Anonymous User"  
published: 2014-03-26  
updated: 2014-03-26  
canonical: https://www.mindstick.com/forum/1986/how-to-reset-user-control-by-getting-the-value-from-other-form  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to reset user control by getting the value from other form

I have form1 : [User control](https://www.mindstick.com/forum/294/problem-in-access-the-control-inside-the-user-control) and form2: form. I want to reset all the the [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) from form2 that will [effect](https://yourviews.mindstick.com/view/81363/coronavirus-effect-on-american-farms-is-severe)/reset showing to user control by using reset [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net). the user control get value from form2

something I tried:

RoomPlan.RoomStatus [STATUS](https://www.mindstick.com/articles/157184/check-lic-policy-status-online-by-policy-number) = rpRoomPlan[i].roomstatus();

if (STATUS == RoomPlan.RoomStatus.CLEAN)

{

generateRoomPlan();

om.IM_RESET_ROOM_STATUS(Convert.ToInt32(ROOMID));

rpRoomPlan[i].Enabled = true;

rpRoomPlan[i].BackColor = Color.WhiteSmoke;

}

om.IM_RESET_ROOM_STATUS is the [web service](https://www.mindstick.com/articles/895/web-service-introduction) *

case RoomStatus.CLEAN:

if (!string.IsNullOrEmpty(dr["ROOMID"].ToString())){

updateRoomDisplay(Color.DeepSkyBlue, Color.DeepSkyBlue, Color.LimeGreen,

"BOOK", "ASSIGNED", "", Color.White, Color.WhiteSmoke, Color.WhiteSmoke, "", "", true);}

when we [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) the reset button then the status BOOK ASSIGNED will change to BOOK UNASSIGN

## Replies

### Reply by Pravesh Singh

Hi Chintoo,

You can reset the form by simply calling it's designer's InitializeComponent() method. It's private by default, so create another public one:

```
public void ResetForm(){  InitializeComponent();}
```

and then call it

form2.ResetForm();


---

Original Source: https://www.mindstick.com/forum/1986/how-to-reset-user-control-by-getting-the-value-from-other-form

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
