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