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
Noah NU
NA
7
0
Passing a variable from one form to another without creating a new instance of the first form
Apr 11 2010 6:16 PM
Let's say I have form1 and form2. Form1 and Form2 are open. You click a button on Form2 and it adds 1 to a variable called myNumber on Form1.
Now the problem is I can't use the new keyword and create a new instance of Form1, because Form1 declares myNumber setting it to 0 on creation of the form. If myNumber gets set to 0 again then all the 1's that were added to that variable were added for nothing....
How do I pass a variable from Form2 to Form1 without creating a new instance of Form1?
Reply
Answers (
3
)
How Do I: Make columns in a DataGridView the minimum size?
AirLine Reservation code need help with bool