mdi form-->> child form 1(button-->> child form2) c # child form from button of some other child form

StackOverflow https://stackoverflow.com/questions/23416964

  •  13-07-2023
  •  | 
  •  

Вопрос

i have mdi form "m1" in which OnLoad open child form "ch1" in child form i have one button "b1" which further open new form "ch2" but that form should be the child of "md1" ch2.MdiParent = this; is not working form me

Это было полезно?

Решение

Since Child Form 2 is being created by Child Form 1, it needs to reference the MdiParent of Child Form 1, not this (which is not an MDI form):

ch2.MdiParent = this.MdiParent;
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top