TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
flipnjme
NA
15
0
values on form1 goto null when form2 is opened
Jun 25 2004 1:12 AM
Im trying to get a value from form1 and use it in form2. If I set a breakpoint right before form2 is loaded the value is set to a drive letter after form 2 loads it goes to null. this is the code im using to open the form: public void GetFileInfo() { Form2 dlg = new From2(); dlg.ShowDialog(); } and this is the code for onload for form2 private void Form2_Load(object sender, System.EventArgs e) { Form1 frm1 = new Form1(); DirectoryInfo di = new DirectoryInfo(frm1.DrvLtr); FileInfo[] fiArr = di.GetFiles(); foreach(FileInfo fi in fiArr) { textBox1.Text = fi.Name; } } any help with this would be greatly appreciated.
Reply
Answers (
3
)
Find data in dataset and assign cell value to a variable
ODBC.NET Add in and the DataGrid