EdB,
I am starting to see a solution. I need a little more clarification:
When you say 'Since the content is the same for each' does this mean each
combo box holds the same data as the next? For example, using a number
series as an example of route data:
MondayComboBox Items
1
2
3
4
TuesdayComboBox Items
1
2
3
4
WednesdayComboBox Items
1
2
3
4
5
and the same for Thursday, Friday, etc.?
Is the operation on the screen to, for one driver - pick one route for
Monday, one route for Tuesday, and so on?
Can you give an example of the real data? Is it really numbers you showed
in your original example? If not what is actually shown for each route item
in the ComboBox.
Mike
"EdB" <EdB@discussions.microsoft.com> wrote in message
news:AFA2E5E8-A333-4A04-AA56-7D173DDB8950@microsoft.com...[color=blue]
>I appreciate the help. Let me give more detail as to the application and
> then perhaps you'll reccommend a best approach.
>
> The application is for a national courier company. Drivers get paid for
> routes they run on given days. At the end of the week, a settlement
> (compensation) process occurs. While most of the information is set for
> the
> user, exceptions must be dealt with.
>
> So, for each day of the week, there is a combo box populated with all the
> routes that exist within a given geographic area. In more dense areas,
> there
> can be lots of routes. The screen takes a long time to paint for these
> "terminals" because I am populating the SundayRoute, MondayRoute,
> TuesdayRoute, etc... combo boxes.
>
> I need one for each day because a driver may do one route on Monday,
> another
> on Tuesday. The day by day comboboxes are very intuitive to the user.
>
> Since the content is all the same for each, I figured I could populate
> one,
> then copy. I'm afraid that the copyto won't reduce the overhead.
>
>
> "Mike McIntyre" wrote:
>[color=green]
>> EdB,
>>
>> I am not saying "you can not set up a source combobox, with all it's
>> entries, then copy it in total and use the copy independently from the
>> source".
>>
>> What I proposed is a common solution to optimizing the loading of
>> ComboBoxes.
>>
>> There are other techniques too, but at this point I think I don't
>> understand
>> your goal clearly.
>>
>> What is the purpose of loading the ComboBoxes the way you outlined?
>>
>> Is it to let the rest of the form load and be viewable immediately while
>> several ComboBoxes build in the background and become useable when they
>> are
>> filled?
>>
>> If that is the case you can use asynchronous delegates (one way to
>> thread).
>>
>> As the form loads your calls the delegate(s) that fill the ComboBoxe(s).
>> The
>> delegates start building the ComboBoxes in the background and do not
>> interfer with loading the rest of the form. You can start with the
>> ComboBoxes disabled. You can have the delegate(s) call back to a
>> procedure
>> in your code each time a ComboBox is filled and the procedure can enable
>> the
>> ComboBox.
>>
>> Or, please clarify your goal and we will see what we can do. ;-)
>>
>>
>> --
>> Mike
>>
>> Mike McIntyre
>> Visual Basic MVP
>>
www.getdotnetcode.com
>>
>>
>> "EdB" <EdB@discussions.microsoft.com> wrote in message
>> news:EBC75246-1126-4E40-9062-6437750EF176@microsoft.com...[color=darkred]
>> > That does not solve my problem. Populating one combobox is not an
>> > issue.
>> > Having just one combobox is not an option.
>> >
>> > Am I going down a path that does not exist?
>> >
>> > Are you (and Ken) saying that I can not set up a source combobox, with
>> > all
>> > it's entries, then copy it in total and use the copy independently from
>> > the
>> > source?
>> >
>> > "Mike McIntyre" wrote:
>> >
>> >> EdB,
>> >>
>> >> One approach is to use one ComboBox but call BeginUpdate just before
>> >> adding
>> >> items, and call EndUpdate after adding items.
>> >>
>> >> See:
>> >>
http://msdn.microsoft.com/library/de...ssaddtopic.asp
>> >>
>> >> Dim intLoop As Integer
>> >> ComboBox1.BeginUpdate
>> >> For intLoop = 0 To 5000
>> >> ComboBox1.Items.Add(intLoop)
>> >> Next
>> >> ComboBox1.EndUpdate
>> >>
>> >> --
>> >> Mike
>> >>
>> >> Mike McIntyre
>> >> Visual Basic MVP
>> >>
www.getdotnetcode.com
>> >>
>> >> "EdB" <EdB@discussions.microsoft.com> wrote in message
>> >> news:5B1DF6F0-F20B-4CD7-A50C-08A7BBFA525E@microsoft.com...
>> >> > 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?
>> >>
>> >>
>> >>[/color]
>>
>>
>>[/color][/color]