I want to use a ContainerControl with a Label to display a message to the user. The ContainerControl must be made visible when an event happens (e.g. a try … catch runtime error) and after e.g. 1 second the ContainerControl must be made invisible or disappear controlled by the Timer settings.
I added a Timer control (’
Timer1’), a ContainerControl (’
ContainerControl11’) and a PushButton (’
PushButton1’) to a Window (
Action event of
Timer1 I have:
And in the ‘Action’ Event of ‘PushButton1’ I have:
ContainerControl11.lblMessage.Text="Hello" ContainerControl11.Visible=True Timer1.Reset
This seems to work. But… I feel uncertain… Is this the correct way to solve my problem?