Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

How do you do when you're passing a variable value between forms? Do you use a shared variable or is there another way?

 

Lik sedning an argument in the Show() method, that would be great.

 

Regards,

SiMoN.

SiMoN.
  • *Gurus*
Posted
The easiest way is to alter the constructor of one form so it accepts an instance of the other form. That way it has a handle around in memory that it can always refer to, if it needs to access any members on the first.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...