Sir,
I created a MDI Parent form and three Mdi Child forms. Each child form contains a button. on clicking the button a new form is displayed. Mean to say if I click all the 3 buttons in 3 child form then there will be 3 new forms displayed. Its Fine.
My problems are :
1- Each new form which is displayed on clicking the button is also shown in the taskbar. I want each new form(apart from mdi child form) to be the mdi child of the main mdi parent.
2- These new forms diaplay the data received from the device connected via serialport. How many serialport objects I must create? If one, then where it must be created, on the Main mdi parent form or on the individual forms(3 new forms) ? If it is on the MDI parent form then how can i access that object in the 3 newly opened forms? If it is on the newly created forms then there would be 3 serialport objects accessing the same COM port which will result an Exception stating- “COM port is not accessible”.
PLease reply… I am recently passed out graduate and new in c#. SO please reply so that i can undrstand properly.
Thanks….
1) Every new Form has a bool property ShowInTaskbar – set it to false
2) SerialPort Object – I would only create one in the main form
In your ChildForms you may access the mainForm by using MdiParent
3) as there is only one object – should no longer occur
hth