Set property on 'Form A' from 'Form B'

  • Thread starter Thread starter Al Williams
  • Start date Start date
A

Al Williams

This is probably very easy - but I'm having a brain dead kind of day.

In my app I have two MDI Child forms - Form A and Form B.

In Form A, I have a WriteOnly Property:


Public WriteOnly Property propDocID() As Integer
Set(ByVal Value As Integer)
mintDocID = Value
End Set
End Property

I call Form B which gives the user the ability to select an item from a
small form that has a treeview control. I want to return an integer from
Form B to set property 'propDocID' in Form A.

This code calls Form B:


Dim frmSelect As New frmOpenTemplate
frmSelect.ShowDialog() 'want to show this form modally

In Form B (frmSelect in this example), I try to set the property 'propDocID'
in form A - but this property doesn't appear to be available. (i.e. it
doesn't appear in the intellesense listing of Form A properties).

Can someome please point me in the right direction here ...
 
* "Al Williams said:
This is probably very easy - but I'm having a brain dead kind of day.

In my app I have two MDI Child forms - Form A and Form B.

In Form A, I have a WriteOnly Property:


Public WriteOnly Property propDocID() As Integer
Set(ByVal Value As Integer)
mintDocID = Value
End Set
End Property

I call Form B which gives the user the ability to select an item from a
small form that has a treeview control. I want to return an integer from
Form B to set property 'propDocID' in Form A.

This code calls Form B:


Dim frmSelect As New frmOpenTemplate
frmSelect.ShowDialog() 'want to show this form modally

In Form B (frmSelect in this example), I try to set the property 'propDocID'
in form A - but this property doesn't appear to be available. (i.e. it
doesn't appear in the intellesense listing of Form A properties).

I would implement that something like that:

<http://groups.google.de/[email protected]>
 
Probably you need to rebuild the application once after making Form A. this may be the foolish thing which generally we forget. but seems to be some different problem at your end. Need to instantiate the previous form with context handler
 
Back
Top