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

Problems with programmatically added control - can't get properties, can't even reference control!

I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of the
control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

The folks who decided to remove control arrays DID NOT DO US ANY
FAVORS!!!!!!!!!!

This is all straight out of a book and is not doing anything useful for
me.

Help, Please!

Mike Morrow
MSDN:MMSA00E62537

iTop = 84

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1

Dim udUpperLim3 As New NumericUpDown
udUpperLim3.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim3)
AddHandler udUpperLim3.ValueChanged, AddressOf UpperChanged
udUpperLim3.Value = My.Settings.Alarm3

Dim udUpperLim5 As New NumericUpDown
udUpperLim5.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim5)
AddHandler udUpperLim5.ValueChanged, AddressOf UpperChanged
udUpperLim5.Value = My.Settings.Alarm5
Jun 28 '08 #1
13 1655
Ju********@home.net wrote:
I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of
the control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!
You need to discover the Name property of a control. :)

It may seem silly, but it is not. Your udUpperLim1 variable is a temporary
reference, and soon out of scope. You need to name the actual object. Add the
control like this:

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.Name = "udUpperLim1"
' all the rest...

If you need to get hold of it later, you can do
Dim udUL As NumericUpDown
udUL = TryCast(Me.Controls.Item("udUpperLim1"), NumericUpDown)
if udUL IsNot Nothing Then
' got it...

In an event handler, you can do the same thing:
Dim udUL As NumericUpDown
udUL = TryCast(sender, NumericUpDown)
if udUL IsNot Nothing Then
' sender is a NumericUpDown
If udUL.Name = "udUpperLim1" Then
' it is that one...


Jun 28 '08 #2
Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.
This is because in your code your not giving the control an ID. Your naming
the variable that is holding the control but not setting the ID property.

Dim udUpperLim1 As New NumericUpDown
'**************************
'Set the ID property of the control
udUpperLim1.ID = "udUpperLim1"
'**************************
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1
Problem 2: When I use sender.tostring, it returns the class name of the
control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!
This is because you are calling .ToString() which returns the objects type
in a string ... try using sender.ID

- Adam

Jun 28 '08 #3

"SneeKeeFahk" <NO****@DONTSPAM.comwrote in message
news:uz**************@TK2MSFTNGP03.phx.gbl...
>Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

This is because in your code your not giving the control an ID. Your
naming the variable that is holding the control but not setting the ID
property.

Dim udUpperLim1 As New NumericUpDown
'**************************
'Set the ID property of the control
udUpperLim1.ID = "udUpperLim1"
'**************************
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1
>Problem 2: When I use sender.tostring, it returns the class name of the
control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

This is because you are calling .ToString() which returns the objects type
in a string ... try using sender.ID

- Adam
If you are doing ASP use the ID property. If you are using winforms use the
Name property.

LS

Jun 29 '08 #4
Mike,

See my sample in your latter question. Be aware that as you drag a control
on a form the ObjectName of the control is in ASPNET or Windowsforms always
the ClassName extended with a number from one to n.

Cor

<Ju********@home.netschreef in bericht
news:b2********************************@4ax.com...
>I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of the
control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

The folks who decided to remove control arrays DID NOT DO US ANY
FAVORS!!!!!!!!!!

This is all straight out of a book and is not doing anything useful for
me.

Help, Please!

Mike Morrow
MSDN:MMSA00E62537

iTop = 84

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1

Dim udUpperLim3 As New NumericUpDown
udUpperLim3.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim3)
AddHandler udUpperLim3.ValueChanged, AddressOf UpperChanged
udUpperLim3.Value = My.Settings.Alarm3

Dim udUpperLim5 As New NumericUpDown
udUpperLim5.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim5)
AddHandler udUpperLim5.ValueChanged, AddressOf UpperChanged
udUpperLim5.Value = My.Settings.Alarm5

Jun 29 '08 #5

<Ju********@home.netwrote in message
news:b2********************************@4ax.com...
<snip>
The folks who decided to remove control arrays DID NOT DO US ANY
FAVORS!!!!!!!!!!
<snip>
Mike Morrow
MSDN:MMSA00E62537
<snip>
Hi Mike,

When I saw the above statement in your post I thought that just couldn't be.
Surely, I thought, arrays of controls are still possible. If not, I have a
lot of code which is not going to work. But then I remembered, from another
of your threads, that you are, like me, an old mainframer - so certainly a
guy of superior intelligence. And I thought therefore I'd better see if
"control arrays" are different from arrays of controls. So I did a search
(using a VB Express which I downloaded just a few days ago) and found the
following statement ...

The BaseControlArray class is the base class for all control arrays used in
applications upgraded from Visual Basic 6.0.

Having never used VB 6 and having never looked into BaseControlArrays I may
not fully understand it, but it looks like there might be some new and
improved version of "control arrays" - whatever they were. And if control
arrays are what I'd imagine them to be perhaps you could create an array of
controls.

ALSO, not sure what you are trying to do, but when I've needed to know
something about a control which caused an event handler to be invoked (when
one event handler is shared by many similar controls, I've used the Tag
property. It's defined as an object so you can jam as much information into
it as you need to.

Are you an ex-mainframer or a current mainframer who also does .Net?

SVC 3, Bob
Jun 29 '08 #6
I did DOS, DOS/VSE and a couple of variations of MVS during my time with
big iron. Mostly assembler, some operating system support with heavy
emphasis on assembler, machine language and REXX. I have known and work
with about a dozen languages but have gone to PC stuff exclusively now.

I have written a little to a lot in all of the following:

1620 Fortran II (a little)
1620 Assembler (a lot)
Fortran IV (moderate)
IBM Assembler (a lot)
IBM Assembler Macro (a lot)
Pascal (till I got tired of typing ";"s)
Atari "Action" (well, I was broke at the time)
C (a little)
CLIST (moderate)
REXX (a lot)
Visual Basic 3-6 (a lot)
Visual Basic.Net (becoming a lot, quite rapidly)

I must have missed a few. I miss assembler and REXX the most. REXX did
some stuff that nothing else did and made life easier.

I remember reading about Array of Controls but cannot find anything in
the index of my books. Going online.

Mike

On Sun, 29 Jun 2008 10:47:01 -0400, in
microsoft.public.dotnet.languages.vb "eBob.com"
<fa******@totallybogus.comwrote:
>
<Ju********@home.netwrote in message
news:b2********************************@4ax.com.. .
> <snip>
The folks who decided to remove control arrays DID NOT DO US ANY
FAVORS!!!!!!!!!!
<snip>
Mike Morrow
MSDN:MMSA00E62537
<snip>

Hi Mike,

When I saw the above statement in your post I thought that just couldn't be.
Surely, I thought, arrays of controls are still possible. If not, I have a
lot of code which is not going to work. But then I remembered, from another
of your threads, that you are, like me, an old mainframer - so certainly a
guy of superior intelligence. And I thought therefore I'd better see if
"control arrays" are different from arrays of controls. So I did a search
(using a VB Express which I downloaded just a few days ago) and found the
following statement ...

The BaseControlArray class is the base class for all control arrays used in
applications upgraded from Visual Basic 6.0.

Having never used VB 6 and having never looked into BaseControlArrays I may
not fully understand it, but it looks like there might be some new and
improved version of "control arrays" - whatever they were. And if control
arrays are what I'd imagine them to be perhaps you could create an array of
controls.

ALSO, not sure what you are trying to do, but when I've needed to know
something about a control which caused an event handler to be invoked (when
one event handler is shared by many similar controls, I've used the Tag
property. It's defined as an object so you can jam as much information into
it as you need to.

Are you an ex-mainframer or a current mainframer who also does .Net?

SVC 3, Bob
Jun 30 '08 #7
How can a control on the main form "go out of scope"?

On Sat, 28 Jun 2008 16:31:38 -0700, in
microsoft.public.dotnet.languages.vb "Steve Gerrard"
<my********@comcast.netwrote:
>Ju********@home.net wrote:
>I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of
the control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

You need to discover the Name property of a control. :)

It may seem silly, but it is not. Your udUpperLim1 variable is a temporary
reference, and soon out of scope. You need to name the actual object. Add the
control like this:

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.Name = "udUpperLim1"
' all the rest...

If you need to get hold of it later, you can do
Dim udUL As NumericUpDown
udUL = TryCast(Me.Controls.Item("udUpperLim1"), NumericUpDown)
if udUL IsNot Nothing Then
' got it...

In an event handler, you can do the same thing:
Dim udUL As NumericUpDown
udUL = TryCast(sender, NumericUpDown)
if udUL IsNot Nothing Then
' sender is a NumericUpDown
If udUL.Name = "udUpperLim1" Then
' it is that one...


Jun 30 '08 #8
OK. I had not run across this .ID stuff in the two books I have read so
far. That should help. Thanks.

On Sat, 28 Jun 2008 18:36:54 -0500, in
microsoft.public.dotnet.languages.vb "SneeKeeFahk" <NO****@DONTSPAM.com>
wrote:
>Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

This is because in your code your not giving the control an ID. Your naming
the variable that is holding the control but not setting the ID property.

Dim udUpperLim1 As New NumericUpDown
'**************************
'Set the ID property of the control
udUpperLim1.ID = "udUpperLim1"
'**************************
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1
>Problem 2: When I use sender.tostring, it returns the class name of the
control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

This is because you are calling .ToString() which returns the objects type
in a string ... try using sender.ID

- Adam
Jun 30 '08 #9
You're really missing the point.

It is NOT the control on the form that is goes out of scope. It is your
LOCAL reference to the control that goes out of scope.

If you do not want your references to go out of scope then define them at a
higher level.

Public Class MyForm
Inherits Form

Private udUpperLim1 As NumericUpDown
Private udUpperLim3 As NumericUpDown
Private udUpperLim4 As NumericUpDown

Private Sub Me_Load(ByVal sender As Object, ByVal e As EventArgs)
Handles Me.Load

iTop = 84

udUpperLim1 = New NumericUpDown
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1

udUpperLim3 = New NumericUpDown
udUpperLim3.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim3)
AddHandler udUpperLim3.ValueChanged, AddressOf UpperChanged
udUpperLim3.Value = My.Settings.Alarm3

udUpperLim5 = New NumericUpDown
udUpperLim5.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim5)
AddHandler udUpperLim5.ValueChanged, AddressOf UpperChanged
udUpperLim5.Value = My.Settings.Alarm5

End Sub

Now, udUpperLim1, udUpperLim3 and udUpperLim5 can be referenced from
anywhere inside MyForm, and, in normal circumstances, will not go out of
scope until MyForm is 'disposed'.

If you look in the 'designer' code for a form you will see that this is
similar to the code generated by VS from the graphical designer.
<Ju********@home.netwrote in message
news:mc********************************@4ax.com...
How can a control on the main form "go out of scope"?

On Sat, 28 Jun 2008 16:31:38 -0700, in
microsoft.public.dotnet.languages.vb "Steve Gerrard"
<my********@comcast.netwrote:
>>Ju********@home.net wrote:
>>I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of
the control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!

You need to discover the Name property of a control. :)

It may seem silly, but it is not. Your udUpperLim1 variable is a temporary
reference, and soon out of scope. You need to name the actual object. Add
the
control like this:

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.Name = "udUpperLim1"
' all the rest...

If you need to get hold of it later, you can do
Dim udUL As NumericUpDown
udUL = TryCast(Me.Controls.Item("udUpperLim1"), NumericUpDown)
if udUL IsNot Nothing Then
' got it...

In an event handler, you can do the same thing:
Dim udUL As NumericUpDown
udUL = TryCast(sender, NumericUpDown)
if udUL IsNot Nothing Then
' sender is a NumericUpDown
If udUL.Name = "udUpperLim1" Then
' it is that one...


Jun 30 '08 #10
I will do as you say. However, it looks like it is being defined twice.
When I get to a stopping point, I will certainly try this all out and be
ready to use it next time.

Thanks,
Mike

On Mon, 30 Jun 2008 14:19:42 +1200, in
microsoft.public.dotnet.languages.vb "Stephany Young" <noone@localhost>
wrote:
>You're really missing the point.

It is NOT the control on the form that is goes out of scope. It is your
LOCAL reference to the control that goes out of scope.

If you do not want your references to go out of scope then define them at a
higher level.

Public Class MyForm
Inherits Form

Private udUpperLim1 As NumericUpDown
Private udUpperLim3 As NumericUpDown
Private udUpperLim4 As NumericUpDown

Private Sub Me_Load(ByVal sender As Object, ByVal e As EventArgs)
Handles Me.Load

iTop = 84

udUpperLim1 = New NumericUpDown
udUpperLim1.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim1)
AddHandler udUpperLim1.ValueChanged, AddressOf UpperChanged
udUpperLim1.Value = My.Settings.Alarm1

udUpperLim3 = New NumericUpDown
udUpperLim3.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim3)
AddHandler udUpperLim3.ValueChanged, AddressOf UpperChanged
udUpperLim3.Value = My.Settings.Alarm3

udUpperLim5 = New NumericUpDown
udUpperLim5.SetBounds(228, iTop, 45, 20)
iTop += 20
Me.Controls.Add(udUpperLim5)
AddHandler udUpperLim5.ValueChanged, AddressOf UpperChanged
udUpperLim5.Value = My.Settings.Alarm5

End Sub

Now, udUpperLim1, udUpperLim3 and udUpperLim5 can be referenced from
anywhere inside MyForm, and, in normal circumstances, will not go out of
scope until MyForm is 'disposed'.

If you look in the 'designer' code for a form you will see that this is
similar to the code generated by VS from the graphical designer.
<Ju********@home.netwrote in message
news:mc********************************@4ax.com.. .
>How can a control on the main form "go out of scope"?

On Sat, 28 Jun 2008 16:31:38 -0700, in
microsoft.public.dotnet.languages.vb "Steve Gerrard"
<my********@comcast.netwrote:
>>>Ju********@home.net wrote:
I am adding a bunch of controls with the code below.

Problem 1: When program flow passes to "UpperChanged" when I click it,
the control name is undefined. When I enter:

If udUpperLim1.Value 1 Then

I get an error that udUpperLim1 is "Not Defined" so I cannot get the
value in the control.

Problem 2: When I use sender.tostring, it returns the class name of
the control, not its assigned name. I get
"System.Windows.Forms.NumericUpDown" and not udUpperLim1 and I don't
know who was changed and along with the preceding problem, even if I
did, I can't reference it!
You need to discover the Name property of a control. :)

It may seem silly, but it is not. Your udUpperLim1 variable is a temporary
reference, and soon out of scope. You need to name the actual object. Add
the
control like this:

Dim udUpperLim1 As New NumericUpDown
udUpperLim1.Name = "udUpperLim1"
' all the rest...

If you need to get hold of it later, you can do
Dim udUL As NumericUpDown
udUL = TryCast(Me.Controls.Item("udUpperLim1"), NumericUpDown)
if udUL IsNot Nothing Then
' got it...

In an event handler, you can do the same thing:
Dim udUL As NumericUpDown
udUL = TryCast(sender, NumericUpDown)
if udUL IsNot Nothing Then
' sender is a NumericUpDown
If udUL.Name = "udUpperLim1" Then
' it is that one...


Jun 30 '08 #11
On Jun 29, 8:18 pm, Just_a_...@home.net wrote:
I remember reading about Array of Controls but cannot find anything in
the index of my books. Going online.
Control arrays as they existed in VB6 do not exist in VB.Net. That
is, there is not a index property for a control and the IDE will not
create the array automatically if you give a control the same name as
an existing one.

However, you can create an array of controls just like you would
create an array of integers or an array of strings:

Dim MyControls(12) As Control 'An array of 13 controls

If you wish to be more specific:

Dim MyTextBoxes(12) As TextBox 'An array of 13 text boxes

To assign objects to the arrays, you can use controls that already
exist on the form:

MyTextBoxes(0) = Form1.TextBox1
MyTextBoxes(1) = Form1.TextBox2
'etc.

Or you can create new controls:

MyTextBoxes(0) = New TextBox()
MyTextBoxes(1) = New TextBox()

Then you can wire up their events:

AddHandler MyTextBoxes(0).TextChanged, AddressOf Text_TextChanged
AddHandler MyTextBoxes(1).TextChanged, AddressOf Text_TextChanged

And then in the TextChanged event, you can work with the textbox:

Private Sub Text_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim tmpTextBox As TextBox = DirectCast(sender, TextBox) 'Get a
reference to the textbox that whose text changed

MsgBox(tmpTextBox.Text) 'display its text
End Sub

Chris
Jun 30 '08 #12

<Ju********@home.netwrote in message
news:ui********************************@4ax.com...
... snip ...
I remember reading about Array of Controls but cannot find anything in
the index of my books. Going online.

Mike
I didn't mean Array of Controls, I meant array of controls. I.E.

Dim whatever() as TextBox

just like Dim whatever() as String.

Bob
Jun 30 '08 #13
Bob,

What do you mean by a mainframe.

I assume you are talking about non event driven programming, Be aware that
it is mostly something inherited from the puchcard time.

Most moderen programming is done by handling events raised by humans (wm
messages). Although I am at the moment busy with a project that is batch
processing, the same as in the punchcard time, beside a start I don't need
any events raised by humans.

However, as you are interacting with humans, on whatever device then you
need events to fullfil the way an user expects a program is working in this
milenium.

An event is (as it has to be used) always bound to a method which handles
the event. It is in fact very simple but mostly very difficult described.
In C# the call they first make a delegate (simple a let say in mainframe
terminology a reference to a program address where the method starts), and
then invoke that address (the delegate).

The advance from VB is that is has more less semi hardware solutions.

Cor

"eBob.com" <fa******@totallybogus.comschreef in bericht
news:u2**************@TK2MSFTNGP04.phx.gbl...
>
<Ju********@home.netwrote in message
news:b2********************************@4ax.com...
> <snip>
The folks who decided to remove control arrays DID NOT DO US ANY
FAVORS!!!!!!!!!!
<snip>
Mike Morrow
MSDN:MMSA00E62537
<snip>

Hi Mike,

When I saw the above statement in your post I thought that just couldn't
be. Surely, I thought, arrays of controls are still possible. If not, I
have a lot of code which is not going to work. But then I remembered,
from another of your threads, that you are, like me, an old mainframer -
so certainly a guy of superior intelligence. And I thought therefore I'd
better see if "control arrays" are different from arrays of controls. So
I did a search (using a VB Express which I downloaded just a few days ago)
and found the following statement ...

The BaseControlArray class is the base class for all control arrays used
in applications upgraded from Visual Basic 6.0.

Having never used VB 6 and having never looked into BaseControlArrays I
may not fully understand it, but it looks like there might be some new and
improved version of "control arrays" - whatever they were. And if
control arrays are what I'd imagine them to be perhaps you could create an
array of controls.

ALSO, not sure what you are trying to do, but when I've needed to know
something about a control which caused an event handler to be invoked
(when one event handler is shared by many similar controls, I've used the
Tag property. It's defined as an object so you can jam as much
information into it as you need to.

Are you an ex-mainframer or a current mainframer who also does .Net?

SVC 3, Bob

Jul 1 '08 #14

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

Similar topics

5
by: Arun Bhalla | last post by:
I'm working with VS.NET 2003 and .NET 1.1 (not SP1) on Windows XP SP1. My application is using the Windows Installer Bootstrap. (I may have also installed a module which detects requirements (.NET...
5
by: Mac via DotNetMonster.com | last post by:
Hi all, I have a creating a my own tabpage class (MyTabPage) which inherits the .Net TabPage class. In the relevant event I want to loop through the collection of TabPages and then when I...
1
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
4
by: RN | last post by:
In certain situations, I add a datagrid and a button beneath it. All programmatically added in the "code behind". I add them to a cell with cell.add(datagrid) and cell.add(button). Take the...
2
by: Anil | last post by:
Hello, I am using VS2005 Beta2 and I have added a Simple Line-Graph chart to a ReportViewer control. I can click on the chart and alter for example the Minimum and Maximum scale values of the...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
2
by: Rob | last post by:
I am not sure if this can be implemented.... There exists a TabContol (added at design time) to a form.. Tabs for this TabContol get added at run time. Usage of the following 2 properties...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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: 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...
1
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.