Click here to Skip to main content
15,920,217 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: storeing encrypted passwords Pin
Thomas Stockwell9-Feb-08 15:12
professionalThomas Stockwell9-Feb-08 15:12 
GeneralRe: storeing encrypted passwords Pin
Guffa9-Feb-08 16:12
Guffa9-Feb-08 16:12 
GeneralError creating window handle. Pin
Rupesh Kumar Swami9-Feb-08 3:21
Rupesh Kumar Swami9-Feb-08 3:21 
GeneralRe: Error creating window handle. Pin
Dave Kreskowiak11-Feb-08 4:27
mveDave Kreskowiak11-Feb-08 4:27 
QuestionAn intrique question about Splitcontainer! Pin
JUNEYT9-Feb-08 2:38
JUNEYT9-Feb-08 2:38 
QuestionHow to collect the links in a WebBrowser Document ? [modified] Pin
SekharOne9-Feb-08 0:07
SekharOne9-Feb-08 0:07 
QuestionWhat is causing invalid index when use listviewitemcomparer? Pin
JUNEYT9-Feb-08 0:03
JUNEYT9-Feb-08 0:03 
GeneralRe: What is causing invalid index when use listviewitemcomparer? Pin
Dave Kreskowiak11-Feb-08 4:21
mveDave Kreskowiak11-Feb-08 4:21 
Well, the first problem I see is that your code is making an assumption it shouldn't be making:
While myReader.Read
 
ListView1.Items.Add(myReader.GetValue(0).ToString)
Dim TACC As Int32 = ListView1.Items.Count - 1
 
ListView1.Items(TACC).SubItems.Add(Trim(myReader.GetValue(1).ToString))
 
End While

This code is adding a new item to the list view, but then using an index to add items to that item, which MAY NOT point to the same item! Rewrite the code to create and use a ListViewItem object, modify it with subitems, then add it to the ListView:
While myReader.Read
 
Dim newItem As New ListViewItem(myReader.GetValue(0).ToString)
newItem.SubItems.Add(Trim(myReader.GetValue(1).ToString))
ListView1.Items.Add(newItem)
...




A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralSelect item in combobox when index is known Pin
nishkarsh_k8-Feb-08 23:10
nishkarsh_k8-Feb-08 23:10 
GeneralRe: Select item in combobox when index is known Pin
Thomas Stockwell9-Feb-08 3:00
professionalThomas Stockwell9-Feb-08 3:00 
QuestionReporting issue Pin
Tauseef A8-Feb-08 22:35
Tauseef A8-Feb-08 22:35 
GeneralRe: Reporting issue Pin
Dave Kreskowiak11-Feb-08 4:12
mveDave Kreskowiak11-Feb-08 4:12 
Generalconnecting via LAN Pin
revath8-Feb-08 20:43
revath8-Feb-08 20:43 
GeneralRe: connecting via LAN Pin
nishkarsh_k8-Feb-08 22:52
nishkarsh_k8-Feb-08 22:52 
GeneralRe: connecting via LAN Pin
Dave Kreskowiak11-Feb-08 4:09
mveDave Kreskowiak11-Feb-08 4:09 
GeneralOpening x64 registry using a 32-bit program Pin
Techguy8-Feb-08 20:03
Techguy8-Feb-08 20:03 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Techguy10-Feb-08 15:12
Techguy10-Feb-08 15:12 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Dave Kreskowiak11-Feb-08 4:07
mveDave Kreskowiak11-Feb-08 4:07 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Techguy11-Feb-08 11:05
Techguy11-Feb-08 11:05 
GeneralAuto-Click on run Pin
Prower8-Feb-08 16:52
Prower8-Feb-08 16:52 
GeneralRe: Auto-Click on run Pin
nishkarsh_k8-Feb-08 18:03
nishkarsh_k8-Feb-08 18:03 
GeneralRe: Auto-Click on run [modified] Pin
Prower9-Feb-08 12:12
Prower9-Feb-08 12:12 
GeneralRe: Auto-Click on run Pin
Dave Kreskowiak11-Feb-08 3:59
mveDave Kreskowiak11-Feb-08 3:59 
Generaldatagrid as a data entry Pin
alzaabi20xx8-Feb-08 11:59
alzaabi20xx8-Feb-08 11:59 
GeneralRe: datagrid as a data entry Pin
pmarfleet8-Feb-08 13:22
pmarfleet8-Feb-08 13:22 

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.