RE: I could use some help here
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
dienadel wrote:
How can I use the value i inputed on the textbox on form 1 on form 2?
How to pass values between forms[^]
dienadel wrote:
i want to use the value of str to my form 2. How can I retrieve it?
Retrieve it to where? Back to form1? Same process, but in reverse.
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
Please go thru this link http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp
-
Please go thru this link http://www.codeproject.com/dotnet/passingvaluesbetweenforms.asp
OOPS!!! sorry! that link was already posted.... Didn't see it!!!
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
Hi, There are many ways, but this will be a good one: In form 2: Public MyValue As String In form 1: Dim f as new Form2 f.MyValue = str f.Show Now in form 2 you can simple process the value of MyValue variable. Hope this will help! NajiCo http://www.InsideVB.NET[^]
It's nice 2b important, but it's more important 2b nice...
-
Hi, There are many ways, but this will be a good one: In form 2: Public MyValue As String In form 1: Dim f as new Form2 f.MyValue = str f.Show Now in form 2 you can simple process the value of MyValue variable. Hope this will help! NajiCo http://www.InsideVB.NET[^]
It's nice 2b important, but it's more important 2b nice...
Naji El Kotob wrote:
There are many ways, but this will be a good one
I'll have to disagree on that one. Destroying encapsulation by making a class field public is rarely a good idea. See these two articles for a discussion on the subject: * Why make fields in a class private, why not just make them public?[^] * The public fields debate again[^]
Upcoming events: * Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ... "I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless." My website
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
-
Please read the forum guidelines. Highlights include making your message title have meaning. Everyone here needs help.
_____________________________________________ Flea Market! It's just like...it's just like...A MINI-MALL!
leckey wrote:
Highlights include making your message title have meaning.
Yes. I find that using the < pre > ... < / pre > with the < code > ... < / code > tags makes it much more readable.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
-
I have an example: Form 1: contains 1 textbox and 1 button Question: How can I use the value i inputed on the textbox on form 1 on form 2? Like for example: Form 1: private sub button1_click dim str as string str = textbox1.text end sub Form 2: i want to use the value of str to my form 2. How can I retrieve it?
-
Hi, There are many ways, but this will be a good one: In form 2: Public MyValue As String In form 1: Dim f as new Form2 f.MyValue = str f.Show Now in form 2 you can simple process the value of MyValue variable. Hope this will help! NajiCo http://www.InsideVB.NET[^]
It's nice 2b important, but it's more important 2b nice...