Click here to Skip to main content
15,886,806 members
Home / Discussions / C#
   

C#

 
GeneralRe: Java to C#.NET pause button code ? Pin
Software_Specialist13-Apr-07 5:09
Software_Specialist13-Apr-07 5:09 
GeneralRe: Java to C#.NET pause button code ? Pin
Judah Gabriel Himango13-Apr-07 11:17
sponsorJudah Gabriel Himango13-Apr-07 11:17 
QuestionListbox selecteditems Pin
Saamir13-Apr-07 3:04
Saamir13-Apr-07 3:04 
AnswerRe: Listbox selecteditems Pin
Luc Pattyn13-Apr-07 4:14
sitebuilderLuc Pattyn13-Apr-07 4:14 
AnswerRe: Listbox selecteditems Pin
Saamir13-Apr-07 11:32
Saamir13-Apr-07 11:32 
GeneralRe: Listbox selecteditems Pin
Luc Pattyn13-Apr-07 14:22
sitebuilderLuc Pattyn13-Apr-07 14:22 
GeneralRe: Listview selecteditems Pin
Saamir15-Apr-07 8:05
Saamir15-Apr-07 8:05 
GeneralRe: Listview selecteditems Pin
Luc Pattyn15-Apr-07 8:24
sitebuilderLuc Pattyn15-Apr-07 8:24 
Hi,

so you want to copy, not move.
Here is what I would try (assuming the items are just strings, if not modify where
appropriate):

ListView lvw1=new ListView();
ListView lvw2=new ListView();
...
foreach (string s1 in lvw1.SelectedItems) {
    bool found=false;
    foreach (string s2 in lvw2.Items) {
        if (s1==s2) {
            found=true;
            break;
        }
    }
    if (!found) lvw2.Items.Add(s1);
}


Smile | :)

Luc Pattyn

[My Articles]

GeneralRe: Listview selecteditems Pin
Saamir15-Apr-07 14:22
Saamir15-Apr-07 14:22 
QuestionText effects using GDI... Pin
Ravikumar Patra13-Apr-07 2:21
professionalRavikumar Patra13-Apr-07 2:21 
AnswerRe: Text effects using GDI... Pin
Pete O'Hanlon13-Apr-07 3:02
mvePete O'Hanlon13-Apr-07 3:02 
GeneralRe: Text effects using GDI... Pin
Ravikumar Patra13-Apr-07 3:09
professionalRavikumar Patra13-Apr-07 3:09 
Questionhow to get Coloumns counts of ListView using SendMessage() Pin
Farhan Ali13-Apr-07 1:32
Farhan Ali13-Apr-07 1:32 
QuestionWrong forum? Pin
CPallini13-Apr-07 2:22
mveCPallini13-Apr-07 2:22 
AnswerRe: Wrong forum? Pin
Farhan Ali13-Apr-07 2:25
Farhan Ali13-Apr-07 2:25 
GeneralRe: Wrong forum? Pin
CPallini13-Apr-07 2:54
mveCPallini13-Apr-07 2:54 
GeneralRe: Wrong forum? Pin
Farhan Ali13-Apr-07 19:32
Farhan Ali13-Apr-07 19:32 
QuestionBackgroundWorker and STA threading model ? Pin
Christian Graus13-Apr-07 0:53
protectorChristian Graus13-Apr-07 0:53 
AnswerRe: BackgroundWorker and STA threading model ? Pin
Pete O'Hanlon13-Apr-07 0:56
mvePete O'Hanlon13-Apr-07 0:56 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Christian Graus13-Apr-07 1:27
protectorChristian Graus13-Apr-07 1:27 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Pete O'Hanlon13-Apr-07 1:41
mvePete O'Hanlon13-Apr-07 1:41 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Christian Graus13-Apr-07 10:59
protectorChristian Graus13-Apr-07 10:59 
GeneralRe: BackgroundWorker and STA threading model ? Pin
Pete O'Hanlon15-Apr-07 9:18
mvePete O'Hanlon15-Apr-07 9:18 
Questionregioning, drag'n'drop & saving drafts Pin
xtremetechnology13-Apr-07 0:43
xtremetechnology13-Apr-07 0:43 
QuestionDetect system shutdown Pin
Bob Stanneveld13-Apr-07 0:11
Bob Stanneveld13-Apr-07 0:11 

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.