Thnkz rodger, I was sitting for this, by tring boxin and all...but simply
superb and effective..WORKING FINE now..
THNKZ THNKZ
by the by i have few more queries.,
Assuming i'm using VS2005 beta 2, C#
q(1). I have MDI parent and MDI child window. I have placed tools menu in
MDI parent which is containing a list of items say imagesharp, imagecontrast
etc....if i click imagesharp of MDI parent, i have to sharp the image in
MDI child. How i can communicate [ MDI Parent ---- > MDI child ] ??
q(2). Wht are all the ways to access the MDI child member functions from MDI
parent class... ??
q(3). Using this.activechild to get the current active child window, but do
know how to pass an event or variables from MDI parent to that current
active child...???
Maheshkumar.R
http://spaces.msn.com/members/cyberiafreak
Rodger Constandse said:
Hi,
I don't think this is a literal translation of your code, but it should
accomplish what you want:
IMDIChild child = this.ActiveMdiChild as IMDIChild;
if (child != null)
{
child.calculate();
}
The advantage is that this will not throw an exception if ActiveMdiChild does
not implement IMDIChild, it will just not call the calculate method.
I believe the literal translation would be:
if (this.ActiveMdiChid != null)
{
IMDIChild child = (IMDIChild) this.ActiveMdiChild;
child.calculate();
}
which will throw an exception if ActiveMdiChild is not not null and is not an
IMDIChild.
Best regards,
Rodger
Achieve Planner time managment software - Project/task outliner with calendar
<
http://www.effexis.com/achieve/planner.htm>
Sequence Diagram Editor - Draw sequence diagrams faster
<
http://www.SequenceDiagramEditor.com>