Click here to Skip to main content
15,902,938 members
Home / Discussions / C#
   

C#

 
GeneralRe: Write audio to USB Modem via COM Port Pin
OriginalGriff5-Nov-17 2:40
mveOriginalGriff5-Nov-17 2:40 
GeneralRe: Write audio to USB Modem via COM Port Pin
ManojKumarShah20175-Nov-17 3:46
ManojKumarShah20175-Nov-17 3:46 
GeneralRe: Write audio to USB Modem via COM Port Pin
ManojKumarShah20175-Nov-17 4:10
ManojKumarShah20175-Nov-17 4:10 
QuestionMultithreaded function calls Pin
Kenneth Haugland4-Nov-17 4:41
mvaKenneth Haugland4-Nov-17 4:41 
AnswerRe: Multithreaded function calls Pin
Sascha Lefèvre4-Nov-17 6:13
professionalSascha Lefèvre4-Nov-17 6:13 
GeneralRe: Multithreaded function calls Pin
Kenneth Haugland4-Nov-17 6:49
mvaKenneth Haugland4-Nov-17 6:49 
GeneralRe: Multithreaded function calls Pin
Sascha Lefèvre4-Nov-17 7:01
professionalSascha Lefèvre4-Nov-17 7:01 
GeneralRe: Multithreaded function calls Pin
Kenneth Haugland4-Nov-17 7:10
mvaKenneth Haugland4-Nov-17 7:10 
GeneralRe: Multithreaded function calls Pin
Sascha Lefèvre4-Nov-17 7:23
professionalSascha Lefèvre4-Nov-17 7:23 
QuestionHow to make the ListView to display each thumbnail immediately after it's loaded? [solved] Pin
alin14-Nov-17 3:02
alin14-Nov-17 3:02 
AnswerRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Dave Kreskowiak4-Nov-17 3:49
mveDave Kreskowiak4-Nov-17 3:49 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 3:51
alin14-Nov-17 3:51 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Dave Kreskowiak4-Nov-17 4:17
mveDave Kreskowiak4-Nov-17 4:17 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 4:06
alin14-Nov-17 4:06 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Dave Kreskowiak4-Nov-17 4:19
mveDave Kreskowiak4-Nov-17 4:19 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 5:57
alin14-Nov-17 5:57 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Sascha Lefèvre4-Nov-17 6:27
professionalSascha Lefèvre4-Nov-17 6:27 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 7:05
alin14-Nov-17 7:05 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Sascha Lefèvre4-Nov-17 7:13
professionalSascha Lefèvre4-Nov-17 7:13 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 7:22
alin14-Nov-17 7:22 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Sascha Lefèvre4-Nov-17 7:25
professionalSascha Lefèvre4-Nov-17 7:25 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 7:30
alin14-Nov-17 7:30 
Yes. I added also a caption for each item. I wanted to fix that later. Anyway, I modified the code a little and it works, but unfortunately the ListView flickers a lot (it's not useable like that):
void BackgroundWorker1DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
    for (var i = 0; i < fileList.Count; i++)
    {
        Bitmap thumbnail = MakeThumbnail(fileList[i], 200, 200);
        backgroundWorker1.ReportProgress(i, thumbnail);
    }
}

void BackgroundWorker1ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e)
{
    imageList1.Images.Add((Bitmap)e.UserState);
    ListViewItem caption = new ListViewItem(Path.GetFileName(fileList[e.ProgressPercentage]));
    caption.ImageIndex = e.ProgressPercentage;
    listView1.Items.Add(caption);
}

void LoadListView()
{
    listView1.LargeImageList = imageList1;
    backgroundWorker1.RunWorkerAsync();
}


Any idea how to improve it?

modified 4-Nov-17 13:48pm.

GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Sascha Lefèvre4-Nov-17 7:39
professionalSascha Lefèvre4-Nov-17 7:39 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
alin14-Nov-17 7:41
alin14-Nov-17 7:41 
GeneralRe: How to make the ListView to display each thumbnail immediately after it's loaded? Pin
Sascha Lefèvre4-Nov-17 7:55
professionalSascha Lefèvre4-Nov-17 7:55 

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.