title: when a form reappears, auto run a function C#
body: <p>I have two win forms, f1 and f2. When I click on row headers of a datagridview on f1, f1 hide, f2 show, and data pass from f1 to f2. Now after users work on f2 and click on "close", f2 hide and f1 show. I've created function in f1 to catch whatever changes users made on the database. Problem is how I can call this function automatically instead of using a button when f2 hide and f1 show? Thanks.</p>