The problem comes when i have to make the button1 visible on the click of button2 and then make it invisible when the process(method Test()) gets over in the code.