User Profile
Collapse
-
That's what I thought I was doing until I realized that to pass the references in a constructor, I needed to create a new instance of the Form1 class which meant I had two Form1s open. I couldn't figure out how to reference the "already open" instance of Form1. I still can't really.... -
-
Okay, after messing with the code more, I realized that I created a new Form1 that wasn't visible and that instance of Form1 has the correctly updated variables f2TB1 and 2. Well, I really didn't want to create another instance of Form1, I just want to pass the data from textBoxes back to the existing instance of Form1.
I'll keep struggling along. Any thoughts would be appreciated.Leave a comment:
-
Passing data between forms
I have a C# problem I've been struggling with for a week now. I can't figure it out. I've made a sample application to demonstrate my problem: how do I pass data between forms? I've read tons of posts/articles etc. about doing this, but I cant make it work. The application I'm writing has a bunch of forms, so when I'm done with one, I'd like to close it to free resources. On the close button event on these forms, I'd like to update variables...
No activity results to display
Show More
Leave a comment: