c# - How to display data in MdiChild forms received from serialport -


sir, created mdi parent form , 3 mdi child forms. each child form contains button. on clicking button new form displayed. mean if click 3 buttons in 3 child form there 3 new forms displayed. fine.

my problems :

1- each new form displayed on clicking button shown in taskbar. want each new form(apart mdi child form) mdi child of main mdi parent.

2- these new forms diaplay data received device connected via serialport. how many serialport objects must create? if one, must created, on main mdi parent form or on individual forms(3 new forms) ? if on mdi parent form how can access object in 3 newly opened forms? if on newly created forms there 3 serialport objects accessing same com port result exception stating- "com port not accessible".

please reply... passed out graduate , new in c#. please reply can undrstand properly. thanks....

1) every new form has bool property showintaskbar - set false

// create new mdi child // within buttonclick in mainform childformclass nf = new childformclass(); nf.mdiparent = this; nf.show(); 

2) serialport object - create 1 in main form in childforms may access mainform using mdiparent

mainform      write public property access serialport  childform      parentformclass p = (parentformclass) this.mdiparent;      p.publicproperty // access serial port object 

3) there 1 object - should no longer occur

hth


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -