I get "Project myapp.exe raised exception class EInvalidOperation with message 'Cannot change Visible in OnShow or OnHide'.