View Single Post
  #8   Spotlight this post!  
Unread 20-09-2006, 00:05
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Visual C++ 2005 Forms

Create a new class that extends from the standard Windows form class.

Add class variables for variables you want to pass in from the calling form.

Now you need to copy the variable from the calling form into your new form class.

You can do this a number of ways: overload the show method (or any other method, or create a new one) to include parameters for all the variables you want to share, and in that method copy the parameters into the class variable.

Or add a constructor to your new form object where you can pass in the varilables you want to share as parameters, and again copy the parameters into the class variable.

Sorry, no code to show you. Just make sure you don't run into synchronization problems with the calling forms shared variables. Cases like this usually call for a modal form so that the calling form execution is blocked until the new form returns.