Click here to Skip to main content
15,887,892 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Class of Classes! [modified] Pin
mr_lasseter21-Jul-06 10:57
mr_lasseter21-Jul-06 10:57 
GeneralRe: Class of Classes! Pin
Alex Feature23-Jul-06 19:29
Alex Feature23-Jul-06 19:29 
AnswerRe: Class of Classes! [modified] Pin
mr_lasseter24-Jul-06 2:30
mr_lasseter24-Jul-06 2:30 
QuestionDownload Files From FTP Server Pin
skysunil20-Jul-06 23:33
skysunil20-Jul-06 23:33 
AnswerRe: Download Files From FTP Server Pin
Robert Rohde20-Jul-06 23:57
Robert Rohde20-Jul-06 23:57 
GeneralRe: Download Files From FTP Server Pin
skysunil24-Jul-06 18:19
skysunil24-Jul-06 18:19 
QuestionListView exception - stumped! [modified] Pin
nzmike20-Jul-06 23:29
nzmike20-Jul-06 23:29 
AnswerRe: ListView exception - stumped! Pin
Dave Sexton20-Jul-06 23:54
Dave Sexton20-Jul-06 23:54 
Try using the FocusedItem property of the ListView.

from memory, try something like this

you have

nzmike wrote:
Dim ndx As Integer = lvwImages.SelectedItems(0).Index 'CODE FALLS OVER HERE!!!!
Dim strImagePath As String = lvwImages.Items(ndx).SubItems(0).Text 'The image filename


I suggest

...

Dim strImagePath As String = lvwImages.FocusedItem.SubItems(0).Text

...


Saves you having to declare the "ndx" variable as well.

I find the FocusedItem property far more useful than SelectedIndex when using a ListView.

I hope this solves your problem.
GeneralRe: ListView exception - stumped! [modified] Pin
nzmike20-Jul-06 23:59
nzmike20-Jul-06 23:59 
GeneralRe: ListView exception - stumped! Pin
Dave Sexton21-Jul-06 0:52
Dave Sexton21-Jul-06 0:52 
AnswerRe: ListView exception - stumped! Pin
mr_lasseter21-Jul-06 11:02
mr_lasseter21-Jul-06 11:02 
GeneralRe: ListView exception - stumped! Pin
nzmike21-Jul-06 15:40
nzmike21-Jul-06 15:40 
QuestionCD scanning Pin
jinal_pandya20-Jul-06 23:18
jinal_pandya20-Jul-06 23:18 
AnswerRe: CD scanning Pin
Dave Sexton20-Jul-06 23:44
Dave Sexton20-Jul-06 23:44 
QuestionHow do I send RTF formated mail using VB.NET? Pin
govind yadav20-Jul-06 23:06
govind yadav20-Jul-06 23:06 
QuestionSQL compare date problem on VB Pin
campbells20-Jul-06 22:19
campbells20-Jul-06 22:19 
AnswerRe: SQL compare date problem on VB Pin
Paddy Boyd20-Jul-06 23:11
Paddy Boyd20-Jul-06 23:11 
GeneralRe: SQL compare date problem on VB Pin
campbells20-Jul-06 23:13
campbells20-Jul-06 23:13 
GeneralRe: SQL compare date problem on VB Pin
ChandraRam25-Jul-06 19:14
ChandraRam25-Jul-06 19:14 
GeneralRe: SQL compare date problem on VB Pin
ChandraRam25-Jul-06 19:15
ChandraRam25-Jul-06 19:15 
QuestionProblem with display of unicode characters with Crystal report Pin
Sithy20-Jul-06 22:00
Sithy20-Jul-06 22:00 
QuestionQuestion about notification among controls Pin
jgyie220-Jul-06 22:00
jgyie220-Jul-06 22:00 
AnswerRe: Question about notification among controls Pin
Rizwan Bashir21-Jul-06 5:30
Rizwan Bashir21-Jul-06 5:30 
GeneralRe: Thanks. Does Observer design pattern or others support that? Pin
jgyie221-Jul-06 6:29
jgyie221-Jul-06 6:29 
Questionanyone...thanks Pin
@$+r020-Jul-06 21:33
@$+r020-Jul-06 21:33 

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.