Click here to Skip to main content
15,742,011 members

Comments by Alan Burkhart (Top 17 by date)

Alan Burkhart 18-May-19 9:04am View    
As to using cmd.exe, it was a quick and easy way to get a list of directories without dealing with any access violations. And I should add that this isn't production code. It's just a utility for my own use. I don't do this for a living.

I tried to figure out the sorting problem by creating a separate project with nothing but a ListView and 2 RadioButtons to select the sorting order (items added in the Designer). Same result.

Public Class Form1
Private Sub RadioButton1_CheckedChanged() Handles RadioButton1.CheckedChanged
LV.Sorting = SortOrder.Ascending
End Sub

Private Sub RadioButton2_CheckedChanged() Handles RadioButton2.CheckedChanged
LV.Sorting = SortOrder.Descending
End Sub
End Class

My understanding is that setting the Sorting property is all that's required unless I'm performing a custom sort, which I'm not. I only need to sort the file names.
Alan Burkhart 17-May-19 18:51pm View    
I created a temp project consisting of 2 radiobuttons and a 2-column listview. In the form's load event I populated the listview by looping thru the FontFamilies on my machine. Col 0 got the names and col 1 was filled with the string length of the names. The radiobuttons were to select the sorting order. The results were the same. The listview blinked but did not re-sort. But the Sorting property is changing each time I click a radiobutton.

Please explain what you mean by "event contention." Thanks.
Alan Burkhart 17-May-19 16:47pm View    
It's a Windows Forms desktop application.
1. Borrows cmd.exe briefly to get a list of directories, then searches file names and / or text for matches. This is done on a background thread.
2. Each dir is searched and if matches are found, a new listviewgroup (w/ the dir path as its text) is created and the items are assigned to the group.
Alan Burkhart 14-Nov-11 9:12am View    
The project in question is just a text editor for my own use. I may switch from the RichTextBox to ScintillaNet. I also dislike the oddball way the RTB handles lines (turning on WordWrap can change the line count).
Alan Burkhart 13-Nov-11 22:17pm View    
I got a buddy of mine to try it on his Win7 machine. Notepad's word wrap still wipes the undo memory in 7. No clue why, but that's how it works. Since I can't change it I won't worry about it. Thanks for taking the time. :-)