473,320 Members | 2,020 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,320 software developers and data experts.

Referencing Controls in WinForms VB.Net Code

In VB6, I could reference controls on a form by name. For
example, if I had a check box named chkFlag, I could do
things like: frmMain.chkFlag.checked = True.

What is the suggested way to reference controls defined
at design time in VB.NET?

Surely I don't have to write code to recursively traverse
the a form's Controls collection every time I want to
reference a control on that form by name? And then coerce
it to the proper type of control before settting its
properties ??!!

I'm in paradigm shift hell here looking for a way out.

Thanks for your help,
Steve Floyd
Jul 21 '05 #1
0 1122

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

Similar topics

1
by: Steve Floyd | last post by:
This is a WinForms question. In the VB6 world, you could easily reference a control by name, e.g., if I want to make the check box named chkFlag visible, I would do this: frmMain.chkFlag.Visible =...
1
by: Will | last post by:
Hi all. I'm learning VB.Net and am developing a WinForms app. I'm trying to make an app that I will use to scan in one or more than on image. I want to use a tabbed interface to hold each image....
1
by: Felipe Garcia | last post by:
Does makes difference referencing controls inside EVERY page <%@ Register TagPrefix="PC" Namespace="MyControls" Assembly="Personal.MyControls" %> or referencing controls ONCE inside web.config,...
0
by: Steve Floyd | last post by:
In VB6, I could reference controls on a form by name. For example, if I had a check box named chkFlag, I could do things like: frmMain.chkFlag.checked = True. What is the suggested way to...
4
by: OpticTygre | last post by:
I have a control I built, for which I would like to add a tool bar icon, but for some reason, it's not working correctly. There is no default namespace (I removed it from the properies page of...
21
by: cmd | last post by:
I have code in the OnExit event of a control on a subform. The code works properly in this instance. If, however, I put the same code in the OnExit event of a control on a Tab Control of a main...
1
by: Ramesh | last post by:
Hello all, I have a form in which I'm trying to load a user control depending on some user choice, and my control's events are not firing properly. Here's a completely stripped down repro of the...
1
by: Bill Woodruff | last post by:
Visual Studio 2005, .NET FrameWork 2.0, C#, WinForms Application Hi, I've read the recent posts by and to 'Thunderbird' (and learned a lot, thanks, from the usual masters Skeet and Paladino,...
3
by: edurazee | last post by:
I am from C# Winforms background and recently switched to ASP.NET in c#. After working with Winforms applications along with BusinessObjects, O/R Mapping frameworks, and logical layering...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.