Link to home
Start Free TrialLog in
Avatar of g_johnson
g_johnsonFlag for United States of America

asked on

problem passing values from called form, VB.Net VSS 2003

in VB.Net (VSS 2003)

I have a main form and it calls another form like this:

dim f as new frmNI
f.ShowDialog
if f.ErrCode = 0 then
     Me.cboPMItem.Items.Add(f.PMItem)
End If
f.close

In frmNI I have this:
    Private m_VendItem As String
    Private m_ErrCode As Integer
    Private m_ErrDesc As String
    Private m_ItemCode As String
    Private m_ItemDesc As String
    Private m_ATAQE As String

    WriteOnly Property VendItem()
        Set(ByVal Value)
            m_VendItem = Value
        End Set
    End Property
    ReadOnly Property ErrCode()
        Get
            Return m_ErrCode
        End Get
    End Property
    ReadOnly Property ErrDesc()
        Get
            Return m_ErrDesc
        End Get
    End Property
    ReadOnly Property PMItem()
        Get
            Return m_ItemCode
        End Get
    End Property
    ReadOnly Property IDesc()
        Get
            Return m_ItemDesc
        End Get
    End Property
    ReadOnly Property ATAQE()
        Get
            Return m_ATAQE
        End Get
    End Property

and of course some routines that set the values for the memory variables, e.g.,

m_ItemCode = "12345"

My problem is that in the calling program intellisense doesn't work for any of the variables.

For example, if I type in the calling program          me.txtAnything = f.PMItem.   the only thing that shows in intellisense is "GetValue" -- why don't I see things like ToString,PadRight, etc -- why does it not know that it's a string or whatever?

Thanks

ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You just beat me to it :)
While you're at it, you might want to declare the scope of your properties, Public, Friend, etc.:

Public ReadOnly Property PMItem() As String
    Get
        Return m_ItemCode
    End Get
End Property
Avatar of g_johnson

ASKER

duh!  And the sad thing is I knew that!  I've been out of VB.Net for so long I forgot.

Thanks
> And the sad thing is I knew that!  I've been out of VB.Net for so long I forgot.

Sometimes it just takes another pair of eyes on something to spot the obvious.  :)  Cheers.