Hey all. I'm having problems determining how to do this.
I have a class that loads 42000+ items into a combobox that is used on multiple forms. I want to load this combobox during the time that the splash-screen is showing, and then just reference it from other forms.
My class code looks something like this:
I know that it populates the combobox, and I'm pretty sure to put the call to that function in the splashscreen_load sub. What is the best way to pass it to another form, or should I make a global variable that can be used project-wide and just have my comboboxes ref that for the data? I want to try to eliminate processing time as much as possible between switching forms.Code:Public Shared Function LoadZipCodes(ByRef cmbCombo As ComboBox) Dim cmbZip As ComboBox GenericCode(1, "Zip Code", cmbZip) cmbCombo = cmbZip Return cmbCombo End Function
Your help is much appreciated.




Reply With Quote