![]() |
| ||
| Trying to speed up GUI response time - Combobox SelectIndexValue event slows down app I realize that the response time of my GUI is extremely slow! I have three combo boxes - I want the user to select a template from one drop down list, which will populate the second drop down list with customers related to that template. When a customer is selected, the third drop down list is to be populated with items related to that customer. Each code snippet that selects the next level (template -> customer; customer -> item) is stored in a separate procedure: Private Sub SelectTemplate() Private Sub PopulateCustList() Private Sub ShowCustomerDetails() Those procedures are called from the SelectIndexChanged events of cboTemplate and cboCustomer, respectfully. I find that in my testing, these SelectIndexChanged events are fired numerous times - every time I add a DataSource, every time I add a DisplayMember. I need to code this logic in such a way that the GUI does not hang for 5 seconds each time a user makes a change. What can I use other than SelectIndexChanged? (One way I tried to get around this is the boolean CustomerLoading and ItemLoading. I change them to True when the datasource and displaymember are being loaded and false otherwise, and try to skip the myriad times the procedures are fired by testing for a False value in the SelectIndexChanged, but either I'm not doing it right, or I'm missing something.) Please assist! |
| All times are GMT -4. The time now is 12:05 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC