Forms question

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi all,

I have just started using VB.Net 2003 and I am having problems setting
property's of a form. Below is a simplified explanation of what my problem
is.

I have 2 forms (FormA and FormB). FormA opens a new instance of FormB (dim
frmB as New FormB, frmB.Show). How can I make FormB set a property on
FormA. I can make FormA set property's on FormB because it created the
instance of FormB, but I am unable to do it the other way round.

Can anyone tell me how to do this.

Many Thanks in advance for any help.
 
* "Mark said:
I have just started using VB.Net 2003 and I am having problems setting
property's of a form. Below is a simplified explanation of what my problem
is.

I have 2 forms (FormA and FormB). FormA opens a new instance of FormB (dim
frmB as New FormB, frmB.Show). How can I make FormB set a property on
FormA. I can make FormA set property's on FormB because it created the
instance of FormB, but I am unable to do it the other way round.

You will have to pass a reference to your instance of 'FormA' to your
instance of 'FormB', for example in a parameter of a method you are
calling on 'FormB', or in a public property of 'FormB'.
 
Hi Herfried,
Many thanks for your reply. It has been proving difficult moving from VB6
to .NET.

Thanks again.

Mark
 
Back
Top