[clsMR.vb] At Project 1
[clsP.vb] At Project 2
mTextBox and mTextLineNumber is the variable to hold the String and integer data. There is another function at Project 2 which open the file and pass the file contents into AddItem.
How do I access the structure element? at anywhere of the Form ? [At Project 2] Something like this
getCodeString = clsP.mRecs.item(0).Codestring
VB.NET:
Public Class clsMR
Public Codestring As String
Public Linenumber As Integer
End Class
[clsP.vb] At Project 2
VB.NET:
Private mRec As clsMR
Private mRecs As System.Collections.Generic.List(Of clsMR)
private sub AddItem()
mRec = New clsMR
With mRec
.Codestring = mTextbox
.Linenumber = mTextLineNumber
End With
mRecs.Add(mRec)
End Sub
How do I access the structure element? at anywhere of the Form ? [At Project 2] Something like this
getCodeString = clsP.mRecs.item(0).Codestring
Last edited by a moderator: