473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

controls on child

hi all

Im trying to set a timer to the enabled state on an mdi childform.
if i load only one form there is no problem.
but when i load more than one form the timer can't be enabled.
I want to be able to enable the timers separated for each form.
the code i have now.

for (int i =0; i < this.MdiChildren.Length;i++)

{

Form tempChild = (Form)this.MdiChildren[i];

if (this.combo1.Text.ToString() == tempChild.Text.ToString())

{

MessageBox.Show(tempChild.Name.ToString());

MessageBox.Show(tempChild.Controls[0].Name.ToString());

MessageBox.Show(tempChild.Controls.Count.ToString( ));

}

else

{

MessageBox.Show("select a start program");

}

}

But it seems that a timer is'nt a control.

there are 2 controls on that form

a datagrid and a timer.

Why won't it show the timer?

or might there be another way to do this

regards Maarten
Nov 29 '05 #1
1 1306
Hi,
i just found the solution my self
hope it helps for someone else.
//EASTING CLICKED
Form activeChild = this.ActiveMdiChild;
if(activeChild==null)
{
frmChild frm = new frmChild();
frm.MdiParent = this;
frm.Show();
int Column = 0;
frm.FillArray(Column);
}
else
{
int Column = 0;
((frmChild)this.ActiveMdiChild).FillArray(Column);
}
regards Maarten.

"Maarten" <gu******@hotmail.com> wrote in message
news:43**********************@news.skynet.be...
hi all

Im trying to set a timer to the enabled state on an mdi childform.
if i load only one form there is no problem.
but when i load more than one form the timer can't be enabled.
I want to be able to enable the timers separated for each form.
the code i have now.

for (int i =0; i < this.MdiChildren.Length;i++)

{

Form tempChild = (Form)this.MdiChildren[i];

if (this.combo1.Text.ToString() == tempChild.Text.ToString())

{

MessageBox.Show(tempChild.Name.ToString());

MessageBox.Show(tempChild.Controls[0].Name.ToString());

MessageBox.Show(tempChild.Controls.Count.ToString( ));

}

else

{

MessageBox.Show("select a start program");

}

}

But it seems that a timer is'nt a control.

there are 2 controls on that form

a datagrid and a timer.

Why won't it show the timer?

or might there be another way to do this

regards Maarten

Nov 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arulraja | last post by:
Hello, I have created 2 custom server controls, The parent custom control contains multiple child custom controls. The Child control has a button on it. If I Click the button control, it...
1
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As...
10
by: dx | last post by:
I have the Microsoft Press: Developing Microsoft ASP.NET Server Controls and Components book. It's starting to shine some light on control development but there is something about composite...
2
by: Juan Romero | last post by:
Hey guys, I am working on a web custom control that basically draws a table (ASP Table) with a few child controls in the cells. I have a command button inside one of these cells. The problem I...
9
by: antonyliu2002 | last post by:
I want to create session objects for all web controls in a page. Right now, I am doing it in a dumb way like this (for example): Session("Session1") = ctrl1.Text Session("Session2") =...
6
by: Louise | last post by:
I use Visual Basic .NET Framework 1.1, Visual Studio. I have a Web page (aspx) referencing a control (ascx) that has a placeholder that is assigned one of 2 child controls through buttons. The...
0
by: Jeremy Chapman | last post by:
I have included below virtually all the code to a control I'm trying to build. My issue is that an array list property in my control does not get persisted properly to the aspx page code in design...
3
by: Mike Collins | last post by:
I have some controls that I am creating dynamically. After the user finishes entering their answers in these controls, I would like to iterate through these controls and get the answers out. I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.