MDI

  • Thread starter Thread starter Maarten
  • Start date Start date
M

Maarten

Hi,

I have an MDI interface.
In the parrentform i can open multiple childforms.

form program1
form program2
form program3
....
like this
DocNum++;

Worksheet.Text = "Document " + DocNum.ToString();

Worksheet.MdiParent = this;

Worksheet.Text = "Program " + DocNum;

Worksheet.Name = "Program " + DocNum;

Worksheet.Show();


the form that's loaded has a timer on it.

I'm trying to start the timer from the parentform with a startbutton in a
toolbar.
is there a way to only start the timer on the active mdichild.
or let the user choose a form where he wants the timer to start. <---- i
prefer this.

Kind regards Maarten.
 
I assume that each of the forms have the timer implemented? As long as
they all have it, forget about the doc#, instead keep an arraylist of
all of the mdi windows that are open. When the user wants to start a
timer go back through the list, populate a drop down with the names of
the mdi windows, and then run the timer on the mdi they choose in the
drop down.
 
Thinking over it again, you may want to invoke the timer from the mdi
you are trying to run it on incase you have it running on a different
thread...

ArrayList[n].invoke("function", null, null)

It probably won't look exactly like that but hopefully you'll get the drift.
 
Hi

indeed i was planning do do this with a combobox.
but how can i call a class on a childform based on the name of that form.
because the class is named the same
or does the name of the clas shanges with the formname while creating it???

regards Maarten.


Benny Raymond said:
Thinking over it again, you may want to invoke the timer from the mdi
you are trying to run it on incase you have it running on a different
thread...

ArrayList[n].invoke("function", null, null)

It probably won't look exactly like that but hopefully you'll get the drift.

Benny said:
I assume that each of the forms have the timer implemented? As long as
they all have it, forget about the doc#, instead keep an arraylist of
all of the mdi windows that are open. When the user wants to start a
timer go back through the list, populate a drop down with the names of
the mdi windows, and then run the timer on the mdi they choose in the
drop down.
 
Are all of the child forms from the same class? if that's the case it
would be like this

(class) ArrayList[n].timerfunction();

or like I said earlier

ArrayList[n].invoke...
 
Hi,
Im trying to understand what you are saing but
the timerfuncton and the classes are all named the same becouse
it's the same class/form.

thanks fot the reply's.
 

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