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. Parent Children Form

Parent Children Form

Scheduled Pinned Locked Moved Visual Basic
helpdocker
3 Posts 2 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.
  • P Offline
    P Offline
    psmukil
    wrote on last edited by
    #1

    Hi, I have an Main.vb(MDI container) form as a parent in that im loading another form Launch.vb in the page load of main.vb. In the button click ok launch.vb form i should display a form called change.vb. So in the button click event of launch.vb form i have created an instance of the change.vb form and im showing the form. But when i assigned the top and left of the form its not taking. If i assign the CAEditor.MDIParent = Me, its giving error, because Launch is not an MDI Container. The code written in the Launch.vb form button click event. Its working fine but the top and left locations are not taking. and its showing the form in different location. Dim CAEditor As New frmChange CAEditor.ShowInTaskbar = False ''''''''CAEditor.MDIParent = Me CAEditor.Left = 310 CAEditor.Top = 82 CAEditor.ShowDialog(Me) How i can assign the location of Change.vb the form in the button click of Launch.vb. If i specify the location in the page load of Change.vb its working fine, but i need to specify in the click event of launch.vb. Please any one help me out to solve this problem, thanks in advance. Regards Mukil.

    Z 1 Reply Last reply
    0
    • P psmukil

      Hi, I have an Main.vb(MDI container) form as a parent in that im loading another form Launch.vb in the page load of main.vb. In the button click ok launch.vb form i should display a form called change.vb. So in the button click event of launch.vb form i have created an instance of the change.vb form and im showing the form. But when i assigned the top and left of the form its not taking. If i assign the CAEditor.MDIParent = Me, its giving error, because Launch is not an MDI Container. The code written in the Launch.vb form button click event. Its working fine but the top and left locations are not taking. and its showing the form in different location. Dim CAEditor As New frmChange CAEditor.ShowInTaskbar = False ''''''''CAEditor.MDIParent = Me CAEditor.Left = 310 CAEditor.Top = 82 CAEditor.ShowDialog(Me) How i can assign the location of Change.vb the form in the button click of Launch.vb. If i specify the location in the page load of Change.vb its working fine, but i need to specify in the click event of launch.vb. Please any one help me out to solve this problem, thanks in advance. Regards Mukil.

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

      Setup properties on the Change.vb form for Left and Top. Pass the values from the calling form to the Change.vb before you open the Change.vb form. Then in the load event from the Change.vb form set the left and top based on the sent values.

      P 1 Reply Last reply
      0
      • Z zacharyshroyer

        Setup properties on the Change.vb form for Left and Top. Pass the values from the calling form to the Change.vb before you open the Change.vb form. Then in the load event from the Change.vb form set the left and top based on the sent values.

        P Offline
        P Offline
        psmukil
        wrote on last edited by
        #3

        Thanks for your reply. i will check it Mukilan.

        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