hmm well it seems my method isn't quite as infallable as i thought, i still get crashes once in a blue moon.
what's weird about it is this though- as far as i've tested, the program NEVER crashes if i make a breakpoint at the line of code where the image is first loaded into the testing (stretch=false) imagebox. the program halts before loading the image, i push F8 to allow the program to execute that line of code to load the image, and the program automatically jumps to the errorhandler before going to the next line.
here's some pseudo-code; the asterisk is the breakpoint:
imgtestingbox.stretch = false
imgmaindisplay.stretch = true
on error goto errorhandler
*imgtestingbox.picture = loadpicture(filename)
imgmaindisplay.picture = loadpicture(filename)
rest of code goes here
exit sub
errorhandler:
msgbox("there was an error")
exit sub
i suspect that the program starts loading the picture into the problematic stretch=true box before the program realizes the one in the stretch=false box is going to set off an error. i came to this conclusion because i seem to have more problems with this on my p4 than my p3.
is there a way to use an if/then statement to say "if [error happens] then [exit sub] else [continue]" right after loading the picture into the imgtestingbox? "on error..." just doesn't seem to cut it.