Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Get text back To Form1 from Form2 in VB.net

Get text back To Form1 from Form2 in VB.net

Scheduled Pinned Locked Moved Visual Basic
csharpdatabase
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    New_Coder
    wrote on last edited by
    #1

    I am working witn VB2003.net on a windows app. I have an on enter trigger of my text box on form1 that opens form2. I am looking to get the data string entered into the text box on form2 back into the text field in form1 after form 2 is closed. Does anyone have any ideas :(

    Z S 2 Replies Last reply
    0
    • N New_Coder

      I am working witn VB2003.net on a windows app. I have an on enter trigger of my text box on form1 that opens form2. I am looking to get the data string entered into the text box on form2 back into the text field in form1 after form 2 is closed. Does anyone have any ideas :(

      Z Offline
      Z Offline
      zacharyshroyer
      wrote on last edited by
      #2

      Private Sub TextBoxOnForm1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBoxOnForm1.Enter Dim frm As New Form2 With frm .ShowDialog() Me.TextBoxOnForm1.Text = .TextBoxOnForm2.Text End With End Sub

      1 Reply Last reply
      0
      • N New_Coder

        I am working witn VB2003.net on a windows app. I have an on enter trigger of my text box on form1 that opens form2. I am looking to get the data string entered into the text box on form2 back into the text field in form1 after form 2 is closed. Does anyone have any ideas :(

        S Offline
        S Offline
        stru0121
        wrote on last edited by
        #3

        I'm not familiar with VB.net, only VB 6.0, but can't you just put the following pseudocode in the "close" or "terminate" function of form 2? : (in form 2 terminate function): buffer = textBox1.caption form1.textBox1.caption = buffer Good luck!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups