4
Answers

convert char to string

Gurjeet Singh

Gurjeet Singh

13y
1.9k
1
How can explicitly convert type  'char' to  'string' or'char' to  'int'
Answers (4)
0
soman
NA 25 0 20y
Hi just go through code, It will make sure that, u r having only one instance.. frmChild childForm = null; foreach(Form form in this.MdiChildren) { if(form is frmChild ) { childForm = (frmChild)form; break; } } if( childForm != null) { childForm.Show(); childForm.Focus(); } else { childForm = new frmChild(); childForm .MdiParent=this; childForm .Show(); childForm .Focus(); } Here frmChild is the child form, in foreach loop just checks for the instance of that frmChild,if found show that one, else create new instance of child... If u find difficulty in understanding the above.. just mess me again. Cheers soman
0
onlybhavin
NA 37 0 20y
hi, thank u simon. but problem is not u said to me. see i m telling u my steps. in mdi form i have menu file. in that sub menu new. now when i click on new option child form opens. now keep in mind i m not closeing child form. i again click new option & the result is. i got another instance of child form. so on my screen 2 child forms appers. i want if 1 instance is open then another can't be open. please guide me. thank u, bhavin
0
shimtanny
NA 440 0 20y
Hi Create child form once (in constructor or pageload). Then in menu only make show, and in child form do not close, but hide it. Simon