ToniMontana Posted April 7, 2004 Posted April 7, 2004 Hi, how can I get the names of my buttons etc. of a user-control while running the program? I know it is possible via reflection. E.g.: I call a method in a user-control and here I want to check, whether it has a button called "btnXY". Quote Greetings, Toni.
*Experts* mutant Posted April 7, 2004 *Experts* Posted April 7, 2004 If you are looking for the name of a control then you don't reflection. Simply going through all the controls in your usercontrol and checking the name will do the job: For Each ctrl As Control In UserControl11.Controls If ctrl.Name = "btnXY" Then 'there is a control with that name End If Next Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.