G
Guest
I'm still having trouble grasping what's going on here and how to resolve it.
In VB6 I have a form that has several combo boxes with lots of items in
each; it takes a long time to load the form because of having to load each
combobox. As I think about converting this to .Net, I believe I should be
able to do something like this:
'position & load the primary object
ComboBox1.Top = 40
ComboBox1.Left = 8
Dim intLoop As Integer
For intLoop = 1 To 5000
ComboBox1.Items.Add(intLoop)
Next
'define & place the copy
Dim cbo2 As New ComboBox
cbo2 = ComboBox1
cbo2.Top = 80
cbo2.Left = 8
cbo2.Text = "ComboBox2"
Me.Controls.Add(cbo2)
But the statement
cbo2 = ComboBox1
doesn't do what I expect. When I view the form, I only see one combobox.
It's like by setting them equal, they become one.
What is the proper way to accomplish this task?
In VB6 I have a form that has several combo boxes with lots of items in
each; it takes a long time to load the form because of having to load each
combobox. As I think about converting this to .Net, I believe I should be
able to do something like this:
'position & load the primary object
ComboBox1.Top = 40
ComboBox1.Left = 8
Dim intLoop As Integer
For intLoop = 1 To 5000
ComboBox1.Items.Add(intLoop)
Next
'define & place the copy
Dim cbo2 As New ComboBox
cbo2 = ComboBox1
cbo2.Top = 80
cbo2.Left = 8
cbo2.Text = "ComboBox2"
Me.Controls.Add(cbo2)
But the statement
cbo2 = ComboBox1
doesn't do what I expect. When I view the form, I only see one combobox.
It's like by setting them equal, they become one.
What is the proper way to accomplish this task?