I think your problem here is that both methods are Shared.
>Is there a way to pass a class instance as a parameter? From within a class method, I would like to pass the parent object reference as a parameter when I call a function.
>
>The class is designed like this:
>
>
>Imports System.Windows.Forms
>
>Public Class App
>
> Public Function Initialize() As Boolean
> End Function
>
> Public Class Encrypt
>
> Public Shared Function Encrypt(ByVal tcString As String, ByVal tcKey As String) As Boolean
> Return Framework.Encrypt.Encrypt(tcString, tcKey, Me)
> End Function
>
> Public Shared Function Decrypt(ByVal tcString As String, ByVal sDecrKey As String) As Boolean
> Return Framework.Encrypt.Decrypt(tcString, sDecrKey, Me)
> End Function
>
> End Class
>
>End Class
>
>
>Where you see the Me reference, this is where I would like to pass the equivalent This.Parent as we have in VFP.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com