In your form, declare a boolean variable(say 'boolTest') and set its value to False.
In the Click event for Button2, set boolTest to True.
In the Click event for Button1, check the state of boolTest and execute code accordingly. Then I assume you would want to reset boolTest to False at the end of Button1_Click.
I don't know enough C# to give you the exact code.
Tony |