Board index » delphi » ** TBITMAP.SAVETOFILE IO-PROB

** TBITMAP.SAVETOFILE IO-PROB

Hi there,

I need some help with the tbitmap. I want to save my bitmap using the
tbitmap.savetofile - it works proper. But just as long as everything is fine
and the file-to-be-saved is able to be written on the hardisk - when an i/o
error occures, I am not able to override him with {$I-} and {$I+}. The program
simply crashes and I go mad :-))

Can someone help me ?

cu markus

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

 

Re:** TBITMAP.SAVETOFILE IO-PROB


mark,
 the simple and logical answer is to encase the savetofile in a try...except
block.For example:

         try
           mybmp.savetofile('somefilename.bmp');
        except
              showmessage('Uh-oh!!..problem!');
         end;

Good luck!!
-Dave
http://www.erols.com/dparsons
----------------------------------------------------
dpars...@erols.com
-----------------------------------------------------

Quote
empha...@my-dejanews.com wrote in message

<6usipe$g7...@nnrp1.dejanews.com>...
Quote
>Hi there,

>I need some help with the tbitmap. I want to save my bitmap using the
>tbitmap.savetofile - it works proper. But just as long as everything is
fine
>and the file-to-be-saved is able to be written on the hardisk - when an i/o
>error occures, I am not able to override him with {$I-} and {$I+}. The
program
>simply crashes and I go mad :-))

>Can someone help me ?

>cu markus

>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Re:** TBITMAP.SAVETOFILE IO-PROB


try looking into the get free space funcitons in the win32 file.  you
might not have enough space.  or you might not have read/write access to
the drive?  or somethig else.

Other Threads