Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

i have 3 forms in vb.net
and all of them contain same textbox to imprt text file and read it in it
but the problem i have to import the text file in each form

how can i import the text file only one time
and it will fill it in all textboxes in all forms

What I have tried:

TextBox3.Text = System.IO.File.ReadAllText("C:\test.txt")
Posted
Updated 14-Apr-18 20:20pm

Create a class to hold that data. Read it once and pass a reference to the class to the form
 
Share this answer
 
create the class form this form actions. And apply the class in any forms you wanted...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900