Click here to Skip to main content
15,902,853 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionProblem binding arraylist to combobox Pin
Nigel Mackay25-Jan-10 18:56
Nigel Mackay25-Jan-10 18:56 
AnswerRe: Problem binding arraylist to combobox Pin
Luc Pattyn26-Jan-10 1:22
sitebuilderLuc Pattyn26-Jan-10 1:22 
QuestionConnecting with webserver? Pin
amnewone25-Jan-10 10:26
amnewone25-Jan-10 10:26 
AnswerRe: Connecting with webserver? Pin
Ravi Bhavnani25-Jan-10 11:09
professionalRavi Bhavnani25-Jan-10 11:09 
GeneralRe: Connecting with webserver? Pin
amnewone29-Jan-10 9:03
amnewone29-Jan-10 9:03 
AnswerRe: Connecting with webserver? Pin
Aman Bhullar28-Jan-10 0:18
Aman Bhullar28-Jan-10 0:18 
GeneralRe: Connecting with webserver? Pin
amnewone29-Jan-10 10:43
amnewone29-Jan-10 10:43 
QuestionHow to load an image, then wait a few seconds, then play a mp3 sound ? Pin
ibmkahm23-Jan-10 1:51
ibmkahm23-Jan-10 1:51 
Hello everybody,

(after pressing a button) i would like to show an image (using a picturebox), wait a few seconds and then play a
mp3 sound, but i dont get it to work. To wait a few seconds i use "System.Threading.Thread.Sleep(5000)". The problem is, the image alway appears AFTER the wait time, but i want it to show first, then wait, then play the mp3... i tried to use "WaitOnLoad = true" but it doesnt work, shouldn't it load the image first and the continue to read the next code line ??

Here is the code i've tried, that doesnt work:

private void button1_Click(object sender, EventArgs e)
{
pictureBox1.WaitOnLoad = true;
pictureBox1.Load("image.jpg");


System.Threading.Thread.Sleep(5000);


MessageBox.Show("test"); //just to test, here should be the code to play the mp3
}


(i also tried loading the image with "LoadAsync" and put the code to wait and play the mp3 in the "LoadCompleted" event, but that doesnt work either...)

would be very nice if somebody helps me
AnswerRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
Geoff Williams23-Jan-10 2:33
Geoff Williams23-Jan-10 2:33 
GeneralRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
ibmkahm23-Jan-10 23:37
ibmkahm23-Jan-10 23:37 
GeneralRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
Luc Pattyn23-Jan-10 23:40
sitebuilderLuc Pattyn23-Jan-10 23:40 
GeneralRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
Mycroft Holmes24-Jan-10 1:39
professionalMycroft Holmes24-Jan-10 1:39 
GeneralRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
Luc Pattyn24-Jan-10 6:55
sitebuilderLuc Pattyn24-Jan-10 6:55 
AnswerSame question : same poster on StackOverFlow : Re: How to load an image Pin
BillWoodruff24-Jan-10 11:54
professionalBillWoodruff24-Jan-10 11:54 
GeneralRe: Same question : same poster on StackOverFlow : Re: How to load an image Pin
Luc Pattyn24-Jan-10 12:06
sitebuilderLuc Pattyn24-Jan-10 12:06 
AnswerRe: How to load an image, then wait a few seconds, then play a mp3 sound ? Pin
rockracker28-Jan-10 14:22
rockracker28-Jan-10 14:22 
Questiondisplay continuous data Pin
zaftblitz21-Jan-10 21:45
zaftblitz21-Jan-10 21:45 
AnswerRe: display continuous data Pin
Richard MacCutchan23-Jan-10 2:36
mveRichard MacCutchan23-Jan-10 2:36 
GeneralRe: display continuous data Pin
zaftblitz23-Jan-10 23:23
zaftblitz23-Jan-10 23:23 
GeneralRe: display continuous data Pin
Richard MacCutchan24-Jan-10 1:09
mveRichard MacCutchan24-Jan-10 1:09 
QuestionError when trying to write to .exe.config file Pin
imak15-Jan-10 8:12
imak15-Jan-10 8:12 
AnswerRe: Error when trying to write to .exe.config file Pin
Dave Kreskowiak15-Jan-10 8:23
mveDave Kreskowiak15-Jan-10 8:23 
GeneralRe: Error when trying to write to .exe.config file Pin
imak15-Jan-10 8:28
imak15-Jan-10 8:28 
GeneralRe: Error when trying to write to .exe.config file Pin
Dave Kreskowiak15-Jan-10 9:28
mveDave Kreskowiak15-Jan-10 9:28 
QuestionHow to change tip location on Quick Launch bar Pin
Corporal Agarn15-Jan-10 1:50
professionalCorporal Agarn15-Jan-10 1:50 

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.