Cita de: TrashAmbishion en 16 Abril 2013, 16:45 PM
Reference to a non-shared member requires an object reference.
este es el error que me atormenta
Pues no tienes que atormentarte xD, simplemente declara las cosas como compartidas (Shared), y listo.
Ejemplo:
Código (vbnet) [Seleccionar]
Public Class Class1
Public Shared SharedVar As String = "Test" ' Esta la podrás leer
Public Var As String = "Test"' Esta no la podrás leer
End Class
Código (vbnet) [Seleccionar]
Imports WindowsApplication1.Class1
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
MsgBox(SharedVar) ' String: "Test"
MsgBox(Var) ' Exception: Reference to a non-shared member requires an object reference
End Sub
End Class
Saludos!