I'm still struggling with putting the jpeg resizer in a thread.On desktop everything runs fine, but on the device i get exceptions indicating that the thread tries to access a control that is under the main gui control.After putting in much effort i threat to fail
I use this somehwere in the main code:
AddImage ("Form1", "Image1", 80,80,100,100)
Image1.Visible = False
because i need the image control for this:
Image1.Image = Jpeg.LoadThumbnail(UploadImageFileName, ScaleToWidth, ScaleToHeight, True)
Jpeg.Save(Image1.Image,UploadImageTempFileName , 80)
I attempted to move the AddImage into the thread, but then i get an exception, that i cannot assign controls i created within a thread to a parent control in a different thread.
The code execution appears to be way more strict on device, so didn't face the exception before i compiled a version for the device, on desktop was everything fine, at least in run mode.
How can i get out of this...?
regards,
TWELVE