473,387 Members | 1,476 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.

how can get windows usercontrols from RunTime ganerater Form


Nicholas Paldino
in my application a have an Windows form on that i place an Panel Control.
in Form
load event i ganerate an Form in Panel Control on Runtime then get an design
time
create user-control (textbox, 2 buttons) in Runtime Form Runtime Form may
be contain
more then 1 same or difreant User Controls.

i want to get all the User controls on that Runtime Form as i can use that
controls
the code which do that mean getting user-controls is in one User Controls
because
user-controls is main key to perform this in user-control i do other more
things

the senario which is i'm thinking is when the usercontrols are place on
RunTime form
in the last User Control is placeed on this then it get the it's Parent Form
that
should be RunTime Form then get all it's Child Controls which will be
User-controls
which are placed on it as we can use that all controls i think will woking
through
Reflecion

the problem i'm face that i cann't that RunTime Form and it's Childs control
as
workable
for handling events i place that body of event procedure that use that
through

userControls's control or some other way

Nov 30 '05 #1
1 1508
raj
if i understand correctly you are trying to get list of all controls in the
panel control

you can try the the controls list

this will traverse (loop) through all the controls

foreach (Control ctrl in myPanel.Controls)
{
//here you can see if its the control you need.
if(ctrl is myCustomControlOne )
{
//take some action
}

}

hth

raj

"Mian Mahboob" <ys******@yahoo.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...

Nicholas Paldino
in my application a have an Windows form on that i place an Panel Control.
in Form
load event i ganerate an Form in Panel Control on Runtime then get an
design time
create user-control (textbox, 2 buttons) in Runtime Form Runtime Form may
be contain
more then 1 same or difreant User Controls.

i want to get all the User controls on that Runtime Form as i can use that
controls
the code which do that mean getting user-controls is in one User Controls
because
user-controls is main key to perform this in user-control i do other more
things

the senario which is i'm thinking is when the usercontrols are place on
RunTime form
in the last User Control is placeed on this then it get the it's Parent
Form that
should be RunTime Form then get all it's Child Controls which will be
User-controls
which are placed on it as we can use that all controls i think will woking
through
Reflecion

the problem i'm face that i cann't that RunTime Form and it's Childs
control as
workable
for handling events i place that body of event procedure that use that
through

userControls's control or some other way

Dec 1 '05 #2

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

Similar topics

1
by: Kate | last post by:
Hi: I have a picturebox control, and at runtime various usercontrols are added to it to make a diagram. As dynamically added usercontrols, they are of type VBExtender. Is there a way to save...
2
by: Emma | last post by:
Hi, I'm developing a GUI with almost all Usercontrols. It's been working wonderfull up till a few weeks ago, and really crashed yesterday. Suddenly I can no longer add some of my usercontrols...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
14
by: RL Stevenson | last post by:
What is a reasonable way to manage a complex form with 5 or so tabs with 100 or more controls bound to 5-10 tables in a database? Pasting all those controls, datasets, data adapters directly onto...
4
by: Andrea Williams | last post by:
Does anyone know of some in depth documentation regarding how to add user controls programatically? I have a User Control, which has some basic html controls, and depending on the number selected...
2
by: Mark | last post by:
Hi, I am wanting to know if it is possible to embed a UserControl into a Page at runtime. What I am trying to do is allow a user to specify that they want a "contact form" or a "latest news" in...
11
by: Crirus | last post by:
I need to derive the Windows.Forms.Control 2 times so I design a class like this Public Class BMControl Inherits System.Windows.Forms.UserControl Public Class MapControl Inherits BMControl
3
by: YYZ | last post by:
I swear I've done my research, and now I was just hoping someone could explain this to me. I've got a base class (usercontrol) that I am using just as an interface. Meaning, I've defined...
1
by: Maya | last post by:
Hello everyone, I have a windows form that has 2 child usercontrols i created and added inside, control1 has a label that displays some text based on activities i do in control2, my question is...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.