S swabygw Active Member Licensed User Longtime User Mar 11, 2017 #1 I use the following code to download an image: Code: Copy Dim j As HttpJob j.Initialize("ImgDownload", Me) j.Download(ServerUrl & "media/" & $Filename) and, then, I use the following code to get the image: Code: Copy Dim bmp As Bitmap = Job.GetBitmap However, every once in a while, for a variety of other reasons, the file to be downloaded is missing or has been deleted by some other process. This causes the above Job.GetBitmap to throw an error which I handle and put a "image missing" image into variable bmp. I'd like to avoid the error entirely - is there a way to test if the Job really has a file or not? I've tried: Code: Copy If Job.GetBitmap = Null Then ... But this doesn't work. Is there another way?
I use the following code to download an image: Code: Copy Dim j As HttpJob j.Initialize("ImgDownload", Me) j.Download(ServerUrl & "media/" & $Filename) and, then, I use the following code to get the image: Code: Copy Dim bmp As Bitmap = Job.GetBitmap However, every once in a while, for a variety of other reasons, the file to be downloaded is missing or has been deleted by some other process. This causes the above Job.GetBitmap to throw an error which I handle and put a "image missing" image into variable bmp. I'd like to avoid the error entirely - is there a way to test if the Job really has a file or not? I've tried: Code: Copy If Job.GetBitmap = Null Then ... But this doesn't work. Is there another way?
S swabygw Active Member Licensed User Longtime User Mar 16, 2017 #21 Thanks, I'll check it out. Upvote 0