vb6 - Fast Listview Loading -


the question simple 1 , many of know listview slower if hidden. there suggestions like:

  1. loading partial data , load on scrolling, though default there no scroll event
  2. load partial data , provide button load more (say 50) records
  3. load partial data, show screen , use timer load remaining data

what other suggestions?

how lockwindowupdate work? equal listview.visible = false? can 2 or more listviews locked using api?

edit

hyperlist looks great use complicated, can 1 please simplify or explain going on @ caller's end i.e. how fill array.

the obvious solution here cross between of mentioned; paging. load set number , allow user page backward , forward using numbered page sequence above or below listview control.

to speed further don't use active recordset; instead, load data array , directly drop information control. use alternative form if want edit information rather editing in listview control.

alternatively create own listview equivalent , write objects directly onto form using own format.

i think if have use lockwindowupdate you're going down wrong path. should able use appropriate property of control prevent user interference.

-- edit --

the idea read data array in memory , loop through , populate listview in similar way this:

private function testinsertlistview() long     dim long     dim j long     dim lt long     dim itmx listitem     lt = timegettime      ' add first row     lvwtest         = 1         set itmx = .listitems.add(, , "row" & & ";col 1")         j = 2 mccols            itmx.subitems(j - 1) = "row" & & ";col" & j - 1         next          = 2 m_irows            set itmx = .listitems.add(i, , "row" & & ";col 1")            j = 2 mccols               itmx.subitems(j - 1) = "row" & & ";col" & j - 1            next         next      end      testinsertlistview = timegettime - lt  end function 

(i found above example here.)

obviously you'd need modify above include reading of data should pretty straightforward. this link gives demo of ado getrows method allows read data.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -