G
Guest
Greetings
Having a problem with a little flicker that is annoying. On the close of the form, would like to fade it out. I use a timer and decrease the opacity as it ticks. Here's the deal, with a small form with few controls, the flicker is not too bad and could be tolerable. Now, when you have a lot of controls on the form it gets really bad.
Here's a better description of what happens: when the "fade button (this case the OK button), the form area is painted completely black, then it paints the original form, with the lesser opacity, then keeps incrementing down. It only happens upon starting the fade feature. For some forms, usually large, it seems like the form is rolling into the center to create the initial black outline, then normal fading, although this may be an optical illusion.
Any ideas would be appreciated.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic
timerFade.Enabled = Tru
End Su
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 problem with a little flicker that is annoying. On the close of the form, would like to fade it out. I use a timer and decrease the opacity as it ticks. Here's the deal, with a small form with few controls, the flicker is not too bad and could be tolerable. Now, when you have a lot of controls on the form it gets really bad.
Here's a better description of what happens: when the "fade button (this case the OK button), the form area is painted completely black, then it paints the original form, with the lesser opacity, then keeps incrementing down. It only happens upon starting the fade feature. For some forms, usually large, it seems like the form is rolling into the center to create the initial black outline, then normal fading, although this may be an optical illusion.
Any ideas would be appreciated.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Clic
timerFade.Enabled = Tru
End Su
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