Working with controls in the multiple forms

hi good day how do i use contols on multiple forms?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Data DudeCommented:
A control can only be located on a single form.   By any chance do you mean MDI forms?
hariprasadereAuthor Commented:
ok it's not really MDI forms.I have two forms form a and form b .form a is an  items entry screen and form b is a category entry screen.In form a i have a command button where user can click and add category of the items.As soon as the user enter the data in the form b n close the form b,  the  cursor should foucs in the first textbox control of the form a .
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
What language are you working in here?...
hariprasadereAuthor Commented:
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
Show Form B using ShowDialog()...

In Form A:  

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim frmB As New FormB
        frmB.ShowDialog() ' code STOPS here until frmB is CLOSED

        ' grab something from frmB
        TextBox1.Text = frmB.TextBox1.Text

        ' give focus to TextBox1
    End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.