I
Ivan Weiss
Hey guys I am trying to fade in a form using the following code:
Public Class frmAbout
Inherits System.Windows.Forms.Form
Dim i As Integer 'Public Variable
#Region The Windows Form code...
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If i < 100 Then
i = i + 1
Me.Opacity = i / 100
Else
Timer1.Stop()
End If
End Sub
End Class
I tried adjusting my timer to various values (currently 500000 as I am
not sure what this number corresponds to) and my timer is started in my
form initialization code. Yet my form does not fade in, it kinda blinks
and just appears. In the function that creates the form I have:
Dim objAbout = New frmAbout()
objAbout.MdiParent = Me
objAbout.Show()
Any ideas on why my form is not fading in?
(THe opacity is set to 0 in the properties window in design view of the
form)
-Ivan
Public Class frmAbout
Inherits System.Windows.Forms.Form
Dim i As Integer 'Public Variable
#Region The Windows Form code...
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
If i < 100 Then
i = i + 1
Me.Opacity = i / 100
Else
Timer1.Stop()
End If
End Sub
End Class
I tried adjusting my timer to various values (currently 500000 as I am
not sure what this number corresponds to) and my timer is started in my
form initialization code. Yet my form does not fade in, it kinda blinks
and just appears. In the function that creates the form I have:
Dim objAbout = New frmAbout()
objAbout.MdiParent = Me
objAbout.Show()
Any ideas on why my form is not fading in?
(THe opacity is set to 0 in the properties window in design view of the
form)
-Ivan