ongchangwei
New member
- Joined
- Jan 10, 2010
- Messages
- 2
- Programming Experience
- Beginner
How to faster loading picture into picturebox?
I have a loop to loading ten picture into ten picturebox, every picture size is 8mb (2304x3456).
Picturebox is (width=140, height=90)
Currently my code is
For i As Integer = 1 To 10
strPicturePath = "C:\Upload\P" & i & ".jpg"
Dim bm As New Bitmap(strPicturePath)
NewPictureBox(i).Image = bm
NewPictureBox(i).SizeMode = PictureBoxSizeMode.Zoom
bm = Nothing
Next
Why very slow need to using about 20 second.
I have a loop to loading ten picture into ten picturebox, every picture size is 8mb (2304x3456).
Picturebox is (width=140, height=90)
Currently my code is
For i As Integer = 1 To 10
strPicturePath = "C:\Upload\P" & i & ".jpg"
Dim bm As New Bitmap(strPicturePath)
NewPictureBox(i).Image = bm
NewPictureBox(i).SizeMode = PictureBoxSizeMode.Zoom
bm = Nothing
Next
Why very slow need to using about 20 second.