Click here to Skip to main content
15,914,222 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Custom Close Pin
Dave Kreskowiak29-Jun-05 11:54
mveDave Kreskowiak29-Jun-05 11:54 
GeneralMSHFlexGrid ShowCaret... Pin
TAlvord29-Jun-05 10:08
TAlvord29-Jun-05 10:08 
GeneralRe: MSHFlexGrid ShowCaret... Pin
Dave Kreskowiak29-Jun-05 10:17
mveDave Kreskowiak29-Jun-05 10:17 
GeneralListView Sorting by Number/Integer Pin
buffbuh29-Jun-05 10:01
buffbuh29-Jun-05 10:01 
GeneralRe: ListView Sorting by Number/Integer Pin
Dave Kreskowiak29-Jun-05 10:12
mveDave Kreskowiak29-Jun-05 10:12 
GeneralRe: ListView Sorting by Number/Integer Pin
buffbuh29-Jun-05 12:18
buffbuh29-Jun-05 12:18 
GeneralRe: ListView Sorting by Number/Integer Pin
Dave Kreskowiak30-Jun-05 2:27
mveDave Kreskowiak30-Jun-05 2:27 
GeneralRe: ListView Sorting by Number/Integer Pin
Anonymous30-Jun-05 8:47
Anonymous30-Jun-05 8:47 
The trick is to do your own sort into a collection and then populate listview directly from collection. for integer sort, you will need to find the largest number to determine the maxlength and then pre-pad 0s up to the maxlength on every number before performing the sort. Multiple column sorting is also going to be a bit tricky, but its possible. You should consider making this into a class so that it can be used in any future projects where you may need it. A good sort algorithm is something like:

Dim colLvw As New Collection, n, i As Integer
Dim lvwItm As ListViewItem
For n = 2 To colLvw.Count
i = n
While (i > 1)
If (StrComp(colLvw(i).[whatever listview column's value], colLvw(i - 1).[whatever listview column's value]) < 0) Then ' use > for descending order
colLvw = swap(colLvw, i, i-1)
i = i - 1
Else
i = 0
End If
Wend
Next
' now collection is sorted so populate listview
Call PopulateListView(colLvw)


Private Function swap(colLvw As Collection, nNdx1 As Integer, nNdx2 As Integer) As Collection
Dim tmpLvw As ListViewItem
tmpLvw = colLvw(nNdx1)
colLvw(nNdx1) = colLvw(nNdx2)
colLvw(nNdx2) = tmpLvw
swap = colLvw
End Function
GeneralActivex Ticker User Control Pin
Ronniedevil29-Jun-05 9:53
Ronniedevil29-Jun-05 9:53 
GeneralRe: Activex Ticker User Control Pin
Dave Kreskowiak29-Jun-05 12:14
mveDave Kreskowiak29-Jun-05 12:14 
Generalcannot call close() while doing createhandle() Pin
oakleaf29-Jun-05 9:52
oakleaf29-Jun-05 9:52 
GeneralRe: cannot call close() while doing createhandle() Pin
Dave Kreskowiak29-Jun-05 10:03
mveDave Kreskowiak29-Jun-05 10:03 
GeneralRe: cannot call close() while doing createhandle() Pin
oakleaf30-Jun-05 2:48
oakleaf30-Jun-05 2:48 
GeneralRe: cannot call close() while doing createhandle() Pin
Dave Kreskowiak30-Jun-05 4:50
mveDave Kreskowiak30-Jun-05 4:50 
GeneralPicture Box - does not fit my picture Pin
Anonymous29-Jun-05 8:16
Anonymous29-Jun-05 8:16 
GeneralRe: Picture Box - does not fit my picture Pin
Christian Graus29-Jun-05 12:00
protectorChristian Graus29-Jun-05 12:00 
QuestionWhere do i start when developing a simple multimedia app for playing only AVI files???? Pin
Joey Picerno29-Jun-05 7:29
Joey Picerno29-Jun-05 7:29 
AnswerRe: Where do i start when developing a simple multimedia app for playing only AVI files???? Pin
StylezHouse29-Jun-05 7:41
StylezHouse29-Jun-05 7:41 
GeneralRe: Where do i start when developing a simple multimedia app for playing only AVI files???? Pin
Joey Picerno29-Jun-05 8:12
Joey Picerno29-Jun-05 8:12 
GeneralRe: Where do i start when developing a simple multimedia app for playing only AVI files???? Pin
Dave Kreskowiak29-Jun-05 9:56
mveDave Kreskowiak29-Jun-05 9:56 
GeneralRe: Where do i start when developing a simple multimedia app for playing only AVI files???? Pin
Joey Picerno30-Jun-05 5:34
Joey Picerno30-Jun-05 5:34 
GeneralNot really VB related but someone has to know Pin
Joey Picerno29-Jun-05 6:25
Joey Picerno29-Jun-05 6:25 
GeneralRe: Not really VB related but someone has to know Pin
StylezHouse29-Jun-05 6:33
StylezHouse29-Jun-05 6:33 
GeneralThank you Pin
Joey Picerno29-Jun-05 7:28
Joey Picerno29-Jun-05 7:28 
GeneralRe: Thank you Pin
SBendBuckeye30-Jun-05 6:37
SBendBuckeye30-Jun-05 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.