Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2005

Tip: Looking for answers? Try searching our database.

how can get windows usercontrols from RunTime ganerater Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mian Mahboob - 30 Nov 2005 10:23 GMT
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
raj - 30 Nov 2005 23:50 GMT
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

> Nicholas Paldino
> in my application a have an Windows form on that i place an Panel Control.
[quoted text clipped - 29 lines]
>
> userControls's control or some other way

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.