A
alberto.decaro
Hello everybody,
I'm developing a ppc application that receives images from a url and
periodically displays them in a picturebox (I use a timer control).
private sub tick(...) handles myTimer.tick
'pbx is the target picturebox control
pbx.image = getImage()
end sub
private function getImage() as bitmap
'strUrl is the stream containing the image
return new bitmap(strUrl)
end function
The problem is that at each ticking a new bitmap object is created
exhausting memory resources.
I'd like creating a bitmap object once and using a '.FromStream' method
at each ticking, but the Image.FromStream static method is not
evailable for the compact framework.
Any clue?
I'm developing a ppc application that receives images from a url and
periodically displays them in a picturebox (I use a timer control).
private sub tick(...) handles myTimer.tick
'pbx is the target picturebox control
pbx.image = getImage()
end sub
private function getImage() as bitmap
'strUrl is the stream containing the image
return new bitmap(strUrl)
end function
The problem is that at each ticking a new bitmap object is created
exhausting memory resources.
I'd like creating a bitmap object once and using a '.FromStream' method
at each ticking, but the Image.FromStream static method is not
evailable for the compact framework.
Any clue?