Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

[VB6] - the variable can be changed inside of a sub?

$
0
0
heres 1 code:
Code:

Public Property Get Opacy() As Long
    Opacy = lngOpacy
End Property

Public Property Let Opacy(ByVal vNewValue As Long)
    lngOpacy = vNewValue.
   
    PropertyChanged "Opacy"
End Property

public sub get()
      sub2(argument1, lngOpacy)
end sub

private sub sub2(arguament1 as long, alpha as long)
      alpha=alpha+4
end sub.

imagine that lngOpacy property it's 20. why after sub2 it's 24(the lngOpacy property)?

Viewing all articles
Browse latest Browse all 21839

Trending Articles