Hello! I've got a calendar in Form 1 in my code, and buttons in Form2. I need these buttons to send codes for this calendar in Form1. How may I make these work? My friend told me to do a function as a new class, but I'm not sure how can I do this. Glad if you can help :)
How Can I Make an Object in Form1 Work in Form2?
Collapse
X
-
-
Both of those are terrible suggestions. Making it static will have major consequences if you use more than one instance of the form. And India777's answer simply will not work. That's creating a new instance of Form1, not the one that already exists.
Read this:
Edit: Forgot that I posted that article here at Bytes too:
The other one has comments where I expand on a few things, so I'll leave it posted.Last edited by Curtis Rutland; May 21 '12, 07:42 PM.Comment
-
Comment