wait while image loaded..

Roma

Member
Joined
Dec 31, 2006
Messages
6
Programming Experience
Beginner
Hi. I want to create a programm for my Pocket PC that shows a picture (loading...)while it doing difficult calculations that takes a long time. But problem is that picturebox.image cannot show picture because all proces priority is divided by picturebox.image and folowing calculations..and most of priority is gived to calculations not to loading image first.. I tried to do something like thread.pause (100000) (sorry i can't remember write code but anyway it doesn't work) after picturebox.image but it paused all proceses including picturebox.image loading... How can i set highest priority to finishing loading image before continue? Please help!:confused:

VB.NET:
[SIZE=2]PictureBox1.Image = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Bitmap("\mypicture.jpg")[/SIZE]
[SIZE=2]'.... there is a plase for something "wait until mypicture.jpg is showed on display"[/SIZE]
[SIZE=2]1: a=a+1   ' a difficult calculations[/SIZE]
[SIZE=2]goto 1[/SIZE]
 
well.. isn't multithreading a solution?
Start a new background thread, and do your calculations there, I guess...
Anyway, isn't there a way to post your code, so that I could have a better guess as to what exactly is the problem?
 
maybe multithreading is the solution..

VB.NET:
PictureBox1.Image = [SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Bitmap("\mypicture.jpg")[/SIZE]
[SIZE=2]1: a=a+1   ' a difficult calculations[/SIZE]
[SIZE=2]goto 1[/SIZE]

can u please write the write code with multithreading for this code? The task is that loading picture must take all priority and after it is loaded continue.. Sorry for my terrible english :(
 
Back
Top