473,396 Members | 1,792 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,396 software developers and data experts.

forms Control collections

VJ
I have a bunch of controls in my Form. Is there a way to locate a control by
using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop through and
locate a control is a option, but that seems to be slow when I have like 40
controls on a form.

Thanks
VJ
Nov 20 '05 #1
8 1353
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with
"start without debugging" (don't know the exact caption of the menue entry
in the "debug" menue, since I use the German version), and see how the speed
turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a control by using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop through and locate a control is a option, but that seems to be slow when I have like 40 controls on a form.

Thanks
VJ

Nov 20 '05 #2
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with
"start without debugging" (don't know the exact caption of the menue entry
in the "debug" menue, since I use the German version), and see how the speed
turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a control by using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop through and locate a control is a option, but that seems to be slow when I have like 40 controls on a form.

Thanks
VJ

Nov 20 '05 #3
VJ
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test
case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?

VJ
"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:eR**************@TK2MSFTNGP11.phx.gbl...
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with
"start without debugging" (don't know the exact caption of the menue entry
in the "debug" menue, since I use the German version), and see how the speed turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a
control by
using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop through

and
locate a control is a option, but that seems to be slow when I have like

40
controls on a form.

Thanks
VJ


Nov 20 '05 #4
VJ
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test
case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?

VJ
"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:eR**************@TK2MSFTNGP11.phx.gbl...
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with
"start without debugging" (don't know the exact caption of the menue entry
in the "debug" menue, since I use the German version), and see how the speed turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a
control by
using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop through

and
locate a control is a option, but that seems to be slow when I have like

40
controls on a form.

Thanks
VJ


Nov 20 '05 #5
VJ,

don't mix up start (also as "release build") and "start without debugging".
The release build in the vs dev environment is still debuggable (even if
only with the disassembler), and therefore slower. If you start without
debugging, how fast (or slow) is it then?
Could you also post some code to see, if we can speed things up there?
What is the time, when you run the program on its own (without the
environment)?
By the way: Are you catching and possible exception in the loop? If so, then
you should really try to run the program in not-debug-mode, since
exceptions, while running the program in the environment, take about 15
seconds to come up - no matter if you catch them, or not.

Klaus

PS: It's already half one, here, so I will only come back to you in the
morning (GMT+1).

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:uJ**************@TK2MSFTNGP10.phx.gbl...
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?

VJ
"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:eR**************@TK2MSFTNGP11.phx.gbl...
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with "start without debugging" (don't know the exact caption of the menue entry in the "debug" menue, since I use the German version), and see how the

speed
turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a control
by
using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop

through and
locate a control is a option, but that seems to be slow when I have
like 40
controls on a form.

Thanks
VJ



Nov 20 '05 #6
VJ,

don't mix up start (also as "release build") and "start without debugging".
The release build in the vs dev environment is still debuggable (even if
only with the disassembler), and therefore slower. If you start without
debugging, how fast (or slow) is it then?
Could you also post some code to see, if we can speed things up there?
What is the time, when you run the program on its own (without the
environment)?
By the way: Are you catching and possible exception in the loop? If so, then
you should really try to run the program in not-debug-mode, since
exceptions, while running the program in the environment, take about 15
seconds to come up - no matter if you catch them, or not.

Klaus

PS: It's already half one, here, so I will only come back to you in the
morning (GMT+1).

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:uJ**************@TK2MSFTNGP10.phx.gbl...
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?

VJ
"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:eR**************@TK2MSFTNGP11.phx.gbl...
VJ,

it shouldn't be slow for "only" 40 controls. Try starting the program with "start without debugging" (don't know the exact caption of the menue entry in the "debug" menue, since I use the German version), and see how the

speed
turns out then.

Klaus

"VJ" <vi********@yahoo.com> schrieb im Newsbeitrag
news:O2**************@TK2MSFTNGP10.phx.gbl...
I have a bunch of controls in my Form. Is there a way to locate a control
by
using its name? , something like in ASP where they use
Controls.FindControl(string name). I know using ForEach to loop

through and
locate a control is a option, but that seems to be slow when I have
like 40
controls on a form.

Thanks
VJ



Nov 20 '05 #7
Cor
Hi VJ,
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?


No, if you want us to help you, show than some code you are using.

Cor
Nov 20 '05 #8
Cor
Hi VJ,
I am testing in Release build.. I was just saying 40 Controls for a
example.. But we actually don't know the run-time controls numbers.. my test case was about 40 controls.. and it took about 20sec to find the control,
and I am on P-4 512 Dell Laptop.. Is this normal?


No, if you want us to help you, show than some code you are using.

Cor
Nov 20 '05 #9

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

Similar topics

12
by: daniel kaplan | last post by:
Hi All, Been learning Javascript (via google) to create forms with pre-set values. As seen below. My problem I have found is this: I can't seem to figure out (or find so far via google) how to...
15
by: Wiktor Zychla | last post by:
today we've found a critical issue regarding the ListView from Windows.Forms. it was confirmed on several machines with Win2K and XP. here's the problem: create a ListView with about 50000 rows....
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
15
by: Alex | last post by:
Does anybody know why VB.NET would omit the Forms collection available in previous versions versions of VB? I imagine that there must be a reason why they decided to do away with it, but I can't...
6
by: Andre Ranieri | last post by:
Hello everyone, I'm wondering if I could get some advice on the best way to build the user interface depicted in this diagram: http://www.senske.com/images/winforms_layout.jpg The gray areas...
0
by: Jake Montgomery | last post by:
I am using .NET 2.0 forms and running on Windows XP SP2. When I have a tooltip on a combo box, and the combo box is expanded (“dropped down”) using the arrow, it will no longer display it’s...
0
by: Patel | last post by:
Hi All, I am doing one INTERESTING work with Context Menu Strip. I am trying to insert a custom control / .Net control in Context menu as a context menu strip. I tried inserting MonthCalender in...
16
by: edepperson | last post by:
I've been looking for an answer to this problem and have seen the same question posted on other forums... but still no answer. My background is Delphi2 - 7 and I used to do this all the time with...
5
by: sklett | last post by:
I know that Panel (and most of it's derivitives) don't raise keyboard events. I *really* need to catch keyboard events though so I've been googling the topic and have found quite a few...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.