PDA

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


iinfi
18-10-2005, 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
19-10-2005, 12:36 PM
before ".show" use
".hide" or "unload" property.
try this and mail me

iinfi
19-10-2005, 01:16 PM
ok i will try n let u know..thanks for ur help

iinfi
21-10-2005, 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
21-10-2005, 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
21-10-2005, 03: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.