473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Exchange data beetwen two forms...

Hi

I have two forms. First frm1, second frm2. I want to click button on
frm1, and then textbox.text(txt) on frm2 = "hello". How?? What command
to button? I tried

Dim frm2 As New frm2
frm2.txt.Text = "hello"

but it isn't working. I have benn working with VB 6, and there it
wasn't any problem to do that...
Thx Mrozu

Dec 17 '05 #1
6 895
Mrozu,

An example:

Dim f As New Form2

f.TextBox1.Text = "Hello"
f.Show()

Kerry Moorman

"Mrozu" wrote:
Hi

I have two forms. First frm1, second frm2. I want to click button on
frm1, and then textbox.text(txt) on frm2 = "hello". How?? What command
to button? I tried

Dim frm2 As New frm2
frm2.txt.Text = "hello"

but it isn't working. I have benn working with VB 6, and there it
wasn't any problem to do that...
Thx Mrozu

Dec 17 '05 #2
Yeah but look. I have showed frm2, and frm1:) And I click button on
frm1, and textbox on frm2 change. How??
Thx Mrozu

Dec 17 '05 #3
Mrozu,

In that case, you need to hang on to the reference to form2.

For example, in Form1's Declarations section:

Dim f As Form2

In Form1's Button1:

f = New Form2
f.Show()

Then in Form1's Button2, after Form2 has been shown:

f.TextBox1.Text = "Hello"

Kerry Moorman

"Mrozu" wrote:
Yeah but look. I have showed frm2, and frm1:) And I click button on
frm1, and textbox on frm2 change. How??
Thx Mrozu

Dec 17 '05 #4
Hey not this way:)

My project is:

On frm2 i click Button1 and then, frm1 show. Then, they are both shown.
And I click button on frm1, and then textbox on frm2 change. Is it
pellucidly writen:> Can you help me??:)

Your advice is, to show frm2 from frm1 , and then change textbox on
frm2. This way i was trying, but it can't be in my project.
Thx Mrozu

Dec 18 '05 #5
Mrozu,

You seem to add another piece of the problem with every post and I'm not
interested in playing that game.

My last remark on your problem: if you want to access data on one form from
another form, you must have a reference to the other form.

Kerry Moorman
"Mrozu" wrote:
Hey not this way:)

My project is:

On frm2 i click Button1 and then, frm1 show. Then, they are both shown.
And I click button on frm1, and then textbox on frm2 change. Is it
pellucidly writen:> Can you help me??:)

Your advice is, to show frm2 from frm1 , and then change textbox on
frm2. This way i was trying, but it can't be in my project.
Thx Mrozu

Dec 18 '05 #6
Sorry

It wasn't wilful. I have frm2. On this form button.Click code for this
button is:

Dim frm1 as New frm1
frm1.show

So after click, frm1 form is shown.

And I want to click on this shown form button, and then textbox on frm2
(this main form ) immediately change. How?? That code, which you gave
me in last post, doesn't work.

Sorry, I know that I entangled, but I didn't know how discribe you my
problem

Please Kerry, I think that you can help me

Thx Mrozu

Dec 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: George Durzi | last post by:
We recently upgraded to Exchange2K3/W2K3 from Exchange2K/W2K, and some of my c# code that I used to access users' contacts using WebDAV has stopped working. I'm getting a 401 unauthorized error....
1
by: arjun ch | last post by:
hai my friend i have one question diff beetwen vbexe and vb .NET exe Arjun *** Sent via Developersdex http://www.developersdex.com ***
0
by: Sister Ray | last post by:
I'm trying to create a simple form that sends an email using my company's exchange server. I'm using the System.Net.Mail Namespace of the .net framework 2.0. I've googled everywhere and i think my...
2
by: Macias | last post by:
Hi, Please tell me how I can exchange data between two forms. My main form is Form1, and I display a new form something like this: private void Settings_Click(object sender, EventArgs e) { using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.