is it possible to pass the value of a text box and the caption of a label from one form to another

Recommended Answers

All 3 Replies

Hi,

Write this Code in Main Form:

Form2.Show
Form2.txtNew.Text = Me.Text1.Text
Form2.lblNew.Caption = Me.Label1.Caption

Regards
Veena

everything is possible. In vb 6 you can direct access value from another form of any control (example is done by veena) but in .net you will find encapsulated form.

i got another solution

just call

Form1.Text1.Text

from Form2 to access the value of Text1 in the form Form1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.