Q:

Decrease form opacity

When I click on Button1, if Form1((me)) opacity is less than 90 then Form1's((me)) opacity should decrease by 9%
This is my code 
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If Me.Opacity > 90 Then
        Me.Opacity = -9
    End If
End Sub

and it's not working

A:

You have few errors. First, > is more, not less. Next, opacity has range 0-1, not 0-100. And last, Me.Opacity=-9 doesn't decrease it by 9, it makes it -9.
It's unclear if you want to decrease opacity by 9% of current opacity or by 0.09.
This decreases by 0.09:
If Me.Opacity < 0.9 Then
    Me.Opacity -= 0.09
End If

And this by 9% of current value:
If Me.Opacity < 0.9 Then
    Me.Opacity -= Me.Opacity * 0.09
End If

If you want, you can set bottom limit:
If Me.Opacity < 0.9 AndAlso Me.Opacity > 0.2 Then
    'Decrease opacity
End If

