How to display result in a different form?

  • Thread starter Thread starter paavani krama via .NET 247
  • Start date Start date
P

paavani krama via .NET 247

(Type your message here)
I am using two forms.From the first form i need to getinformatiom.After performing necessary calculations,the resultshould be displayed in the 2nd form.i am storing the results inpublic variables in 1st form.I want the 2nd form to access thepublic variables in the 1st form and display the same in thesecond form.How can i do it?
 
One way . . .

in form 1
Declare a Public Readonly Property to get a Privately declared variable
value

in form 2
Overload the Sub new and pass it the reference form the the calling form
Use the passed reference to get the Property in form1

in form1
dim f as new Form2(me)
f.show()


--
Terry Burns
http://TrainingOn.net



(Type your message here)
I am using two forms.From the first form i need to get informatiom.After
performing necessary calculations,the result should be displayed in the 2nd
form.i am storing the results in public variables in 1st form.I want the 2nd
form to access the public variables in the 1st form and display the same in
the second form.How can i do it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top