Hello programmers!

I made new software, LD File Browser. This software contains ListView but this ListView has error. Software works fine when I run it on F5 (debug), but when I run .exe icon I got error when I select different item in ListView. Here is the code:

TextBox1.Text = ListView1.SelectedItems(0).Text

and error image:


Now, all what I need is a valid code or way to make my software to allways ignore these erorrs. When I click continue, software still works but everytime when I select different item i got this dialog. How I can skip these error messages or just fix the code?


Recommended Answers

All 8 Replies

This is that same project I already helped on, right?
If you zip and upload it to rapidshare, I'll take a look

Yes it is. This is last thing I need to fix. What you want to upload? Whole project or just files from /release folder?

Clean your solution first, then zip and upload entire project

To start with - you need Try...Catch blocks
The only one I see (other than the designer generated) is in Module1.GetShellIconAsImage

Hmm. I still don't understand what I need to do. :/ Is there any way to disable these error messages?

Hey! I fixed it! :D I changed event Listview1_SelectedIndexChanged to Listview1_Click! :D It works now! :D

Thanks for helping me! ;)

I still highly recommend Try..Catch blocks in all your procedures.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.