Click here to Skip to main content
16,006,531 members
Home / Discussions / C#
   

C#

 
GeneralRemove background image from a button programatically Pin
kloepper18-Jan-05 22:12
kloepper18-Jan-05 22:12 
GeneralRe: Remove background image from a button programatically Pin
Stefan Troschuetz19-Jan-05 0:17
Stefan Troschuetz19-Jan-05 0:17 
GeneralRe: Remove background image from a button programatically Pin
kloepper19-Jan-05 10:02
kloepper19-Jan-05 10:02 
Generaluse of array in this program Pin
ramyasks18-Jan-05 22:00
ramyasks18-Jan-05 22:00 
GeneralShell 32 Dll Pin
rchokler18-Jan-05 21:02
rchokler18-Jan-05 21:02 
GeneralText to Speech Pin
Amir Jalaly18-Jan-05 20:24
Amir Jalaly18-Jan-05 20:24 
GeneralMultiselect in a listview Pin
StephenMcAllister18-Jan-05 20:02
StephenMcAllister18-Jan-05 20:02 
GeneralRe: Multiselect in a listview Pin
mav.northwind19-Jan-05 0:41
mav.northwind19-Jan-05 0:41 
Hi!
The first approach would probably be to iterate over the SelectedIndices collection and to remove the items in there. You have to be careful, though, not to alter the collection inside the loop.
So I'd suggest a for loop instead of a foreach and to iterate over the Items collection and to check for the Selected property:
for (int i=0; i<ListView1.Items.Count; i++)
{
    if (ListView1.Items[i].Selected)
    {
        ListView1.Items.RemoveAt(i);
        i--;
    }
}

(written from memory, no guarantee for correctness Smile | :) )

mav
GeneralRe: Multiselect in a listview Pin
Robert Rohde19-Jan-05 0:46
Robert Rohde19-Jan-05 0:46 
GeneralRe: Multiselect in a listview Pin
mav.northwind19-Jan-05 0:57
mav.northwind19-Jan-05 0:57 
GeneralAccessing web control library properties Pin
Member 37818918-Jan-05 18:06
Member 37818918-Jan-05 18:06 
GeneralSockets Pin
Tyrus18218-Jan-05 16:18
Tyrus18218-Jan-05 16:18 
Generalproblem with database Pin
Newbie_Toy18-Jan-05 15:41
Newbie_Toy18-Jan-05 15:41 
GeneralRe: problem with database Pin
Dave Kreskowiak19-Jan-05 4:18
mveDave Kreskowiak19-Jan-05 4:18 
GeneralHashing a password for storing in a database Pin
Luis Alonso Ramos18-Jan-05 13:11
Luis Alonso Ramos18-Jan-05 13:11 
GeneralRe: Hashing a password for storing in a database Pin
Colin Angus Mackay18-Jan-05 13:39
Colin Angus Mackay18-Jan-05 13:39 
GeneralRe: Hashing a password for storing in a database Pin
Dennis C. Dietrich18-Jan-05 14:37
Dennis C. Dietrich18-Jan-05 14:37 
GeneralRe: Hashing a password for storing in a database - Addendum Pin
Colin Angus Mackay18-Jan-05 13:44
Colin Angus Mackay18-Jan-05 13:44 
GeneralRe: Hashing a password for storing in a database - Addendum Pin
Luis Alonso Ramos18-Jan-05 14:05
Luis Alonso Ramos18-Jan-05 14:05 
Questionhow to encrypt my database file Pin
m.rastgar18-Jan-05 10:14
m.rastgar18-Jan-05 10:14 
Generalcreating setup with .net setup project Pin
m.rastgar18-Jan-05 9:58
m.rastgar18-Jan-05 9:58 
GeneralRe: creating setup with .net setup project Pin
spif200118-Jan-05 20:47
spif200118-Jan-05 20:47 
GeneralCD Ripping Pin
kinetix6318-Jan-05 9:42
kinetix6318-Jan-05 9:42 
GeneralLocation of Richtextbox carot.. Pin
Finn Grimwood18-Jan-05 9:10
Finn Grimwood18-Jan-05 9:10 
GeneralC# Web Services without VS Pin
Michael Potter18-Jan-05 9:01
Michael Potter18-Jan-05 9:01 

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.