Newbie: Managing Changes to Forms.

  • Thread starter Thread starter Edwin Loubser
  • Start date Start date
E

Edwin Loubser

Hi

They way I overcame this problem was to pass a refrence of
form1 2 form2.

class form1

private sub NextForm_Click()
dim frmForward as new form2(me)
frmForward.Show()
end sub

end class

class Form2

dim frmPrev as form1

Public Sub New(ByRef frm1 as form1) 'Constructor
frmPrev = new form1
frmPrev = frm1
end sub

end class

So basicly what I'm doing is creating a new copy of form1
(frmPrev) but then I set that new copy equal to the one
passed by refrence, meaning anything changed on the frmPrev
will also then change on the form1.

Hope this helps!
 
Edwin;

Thanks for the response. I will see if I can understand your example and
apply that logic to my situation. I am just getting started with .NET and
there are several key concepts I don't really understand yet.

Questions at this point -

The "Public Sub New..." - does that replace the "New" keyword that I used?

I am not familiar with the way "me" is used in dim frmForward as new
form2(me)

Thanks

Wayne
 
Back
Top