|
-
Dec 18th, 2007, 08:32 AM
#1
[RESOLVED] [2.0] Pass Data From One Form To Another
In VB.NET to pass something from one form to another I would do
vb.net Code:
'on Form1
Form2.TextBox1.Text = TextBox1.Text
How would I do the same thing in C#?
-
Dec 18th, 2007, 09:40 AM
#2
Re: [2.0] Pass Data From One Form To Another
Ok, in doing some searching on this topic, I discover that in .NET, controls are declared as Friend (in VB) or private (in C#) by default.
However, I don't know how to use this information to get what I need. Would I create a property or class for this?
-
Dec 18th, 2007, 10:08 AM
#3
Lively Member
Re: [2.0] Pass Data From One Form To Another
This is quite problematic in C# to be honest, and I myself have been looking for this for quite a while.
I should have an example of it, let me dig it up!
Edit:
Here are three ways of doing it.
I'll see if I can find more.
Last edited by Zolomon; Dec 18th, 2007 at 10:13 AM.
-
Dec 18th, 2007, 10:32 AM
#4
Re: [2.0] Pass Data From One Form To Another
Thanks for the link. I just glanced at it, but it looks like just what I'm after. I"m going to go read it all right now.
-
Dec 18th, 2007, 10:35 AM
#5
Lively Member
Re: [2.0] Pass Data From One Form To Another
No problems!
I had some difficulty with this during the summer but then I found that link and everything went smoothly afterwards. (:
Cheers,
Zolomon
-
Dec 18th, 2007, 10:46 AM
#6
Re: [2.0] Pass Data From One Form To Another
Ok, using one of the examples in Zoloman's link, I got it to work.
Thanks again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|