views:

29

answers:

1

Hey guys,

I have a 2 files here. One is my main form, and the other is a dialog I made. Now I'm trying to get enter code here the dialog to gradually obtain its transparency from a timer which I have on the dialong form:

If Me.Opacity = "100" Then
            Timer1.Stop()
            Timer1.Enabled = False
        Else
            Me.Opacity = Me.Opacity + 1
        End If

Then from my main form, if I push a button it would do this:

Dialog.Timer1.Enabled = True
        Dialog.Timer1.Start()

this does not seem to work. When I press the button, it does nothing.

Can someone find a solution to this?

Thanks,

Kevin

+1  A: 

Because opacity measured between zero and one (50% = 0.5, 4% = 0.04, 100% = 1 etc.)

Not to mention you compare opacity to the string "100" rather than to the number 100.

Itay