G
Guest
Greetings
Having a bit of a problem with a fade out on a form. I'm using a timer which is enabled via a button and then this timer tick then takes the opacity down to nothing and then eventually closing the application.
However, what is happening is that when the button is clicked that enables the timer and thus the first tick, the form goes all black and then then repaints to the original form and fades out smoothly. I'm sure that this does not occur on the button click event, as I've put the thread to sleep at this point, and verified that it happens upon the first firing of the tick event.
Here's what I've noticed, this is much worse on forms with many controls, it actually appears if the form rolls into the center leaving the black background for just an instant before proceeding normally. Although this "rolling" may be an optical illusion.
Would appreciate if anyone can assist with getting rid of the flicker..........argh... probably something stupid...
Private Sub timerFade_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles timerFade.Tic
If Me.Opacity <= 0 The
Me.Close(
Els
Me.Opacity = Me.Opacity - 0.0
End I
End Sub
Having a bit of a problem with a fade out on a form. I'm using a timer which is enabled via a button and then this timer tick then takes the opacity down to nothing and then eventually closing the application.
However, what is happening is that when the button is clicked that enables the timer and thus the first tick, the form goes all black and then then repaints to the original form and fades out smoothly. I'm sure that this does not occur on the button click event, as I've put the thread to sleep at this point, and verified that it happens upon the first firing of the tick event.
Here's what I've noticed, this is much worse on forms with many controls, it actually appears if the form rolls into the center leaving the black background for just an instant before proceeding normally. Although this "rolling" may be an optical illusion.
Would appreciate if anyone can assist with getting rid of the flicker..........argh... probably something stupid...
Private Sub timerFade_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles timerFade.Tic
If Me.Opacity <= 0 The
Me.Close(
Els
Me.Opacity = Me.Opacity - 0.0
End I
End Sub