DIGIT-ARC read-only archive · snapshot: July 23, 2026

VB Form window woes. added:: Component to datagrid !!!HELP!!

6 posts · originally from https://geek.digit.in/community/threads/vb-form-window-woes-added-component-to-datagrid-help.17162/

iinfi
iinfi Original post #1
Oct 18, 2005 at 11:07 PM
in VB.NET in any Form if i have a button and on its click if make a new form open, the new form opens but the old form does not close. i want the old form to close and the new form to be displayed.

how do i do this.


========================================

And after i click a menu item in a MDI container i have made a form open inside the MDI container. on clicking a button in the new form or the MDI container i want a new form (maximised) to open in the same MDI Container and the previous form to close. the new Form always opens when i try but the previous form does not close. how do i implement this?

Form2 newMDIChild1 = new Form2();
newMDIChild1.MdiParent = Form1();
newMDIChild1.Show();
is the command for opening new window in MDI container.....
shakti
shakti #2
Oct 19, 2005 at 12:36 PM
before ".show" use
".hide" or "unload" property.
try this and mail me
iinfi
iinfi #3
Oct 19, 2005 at 1:16 PM
ok i will try n let u know..thanks for ur help
iinfi
iinfi #4
Oct 21, 2005 at 12:40 AM
there is no unload option ...but the hide is working to some extent ......

-----------------------------------------------
in COM+ using VC# component what sud i do and what code sud i write in the component to retrieve data from a database and display it in a MDI Child Form in a datagrid. plz tell me the code also.
tuxfan
tuxfan #5
Oct 21, 2005 at 12:49 PM
Do you want to come back to the same form or not? If yes, then use .hide otherwise use me.unload
iinfi
iinfi #6
Oct 21, 2005 at 3:25 PM
ok fine .... i got it ...
can u answer my second question ..
in COM+ using VC# component what sud i do and what code sud i write in the component to retrieve data from a database and display it in a MDI Child Form in a datagrid. plz tell me the code also.