well why dont you just check for the Visible property of your button?