Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I need to pass a variable from one form to another.

 

So when I do

 

frm2.Show()

frm1.Close()

 

It opens a new form.

 

However, I thought I could pass my variable from frm1 by doing this:

 

frm2.Show(strValue1,strValue2)

frm1.close

 

But it wont let me.

 

How can I pass the values? Using

 

strNewValue = frm1.strValue is not acceptible because frm2 will need to be accessed from more than one form so I cant ask for frm1.strValue if, say frm3 is passing the string.

 

Any ideas how I pass values from one form to another?

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...