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
  1. Home
  2. General Programming
  3. Visual Basic
  4. easy in VB6 not in .Net

easy in VB6 not in .Net

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
3 Posts 3 Posters 0 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.
  • J Offline
    J Offline
    jlawren7
    wrote on last edited by
    #1

    hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly

    D C 2 Replies Last reply
    0
    • J jlawren7

      hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      jlawren7 wrote: WHy oh why did they remove this simple yet nice way of doing this? Because its not proper OOP. How you want to transfer your information is not proper either. All your transferable data should be stored in a shared class object that either Form class uses to retrieve and store the shared data. That way, neither form class has to know anything about the form. Check out Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET[^] on MSDN for examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      • J jlawren7

        hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly

        C Offline
        C Offline
        cwayman
        wrote on last edited by
        #3

        Hey, From your problem, you could use inheritence in vb.net where you can use controls from one form in another using all the code behind the controls also. Here[^] is a good article Chris

        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