parent handle/control

  • Thread starter Thread starter Ayaz Ali
  • Start date Start date
A

Ayaz Ali

Hello,
Does anybody know how to get window handle of parent window (the main
application window) in C#. I am trying to set mdiParent of a child window in
child's Load( ). I dont know how to set it to parent container control as
the child is created by an intermediary class that doesnt keep parent's
handle or reference.

regards,
anony
 
Hello,
Does anybody know how to get window handle of parent window (the main
application window) in C#. I am trying to set mdiParent of a child window in
child's Load( ). I dont know how to set it to parent container control as
the child is created by an intermediary class that doesnt keep parent's
handle or reference.

regards,
anony

Pass it through.

No, just create a class Pool (singleton) and get the value from there.

Otherwise you will have to traverse the tree of parents. I don't
know how realistic it is, because I favored one of the two approaches above.
 
Hello,
Does anybody know how to get window handle of parent window (the main
application window) in C#. I am trying to set mdiParent of a child window in
child's Load( ). I dont know how to set it to parent container control as
the child is created by an intermediary class that doesnt keep parent's
handle or reference.

regards,
anony

Regex might be an overkill in this case.

String object can split its contents:

String[] fields = "a,b,c,d,ef,gh,ikl".Split(',');
 
Back
Top