Talking with an open form

  • Thread starter Thread starter Daniel Diehl
  • Start date Start date
D

Daniel Diehl

Hi there,
just a short question. How can I get access to a open form (is also
the MDI parent)? <FORMNAME>.<FUNCTION> does not work but I have to
call a method in the mainForm of the Application to start a
taskbar-Notification e.g.

Thanks for an short answer!

Daniel
 
Daniel Diehl said:
How can I get access to a open form (is also the
MDI parent)?
<FORMNAME>.<FUNCTION> does not work

'this.MdiParent' retrieves the parent of an MDI child form.

You will have to cast it to the type of the parent form. For example, if
your main form's class is called frmMain, you might write:

frmMain frm = (frmMain) this.MdiParent;
frm.Text = "this will change the caption";

P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top