[futurebasic] Re: Clipboard/Memory??

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: wave@... (M Goodes)
Date: Sat, 6 Dec 1997 22:18:39 -0500
Just wondering if you're aware that you're creating 80 pictures (assuming
that the value board(x) is always greater than 3).

>I am using the following function to copy a board game to the
>clipboard but it is chewing up memory. Can anyone spot an error?
>
>LOCAL FN Clipboard
>  DIM rect;8
>  PICTURE ON (118,38)-(630,450)                     'record a PICT
>  FOR x = 1 TO 80
>   LONG IF board(x) <> 3
>     PICTURE FIELD x,objs$(board(x))
>   END IF
>  NEXT x
>  PICTURE OFF, hndl&                                'PICT for PICTURE
>  LONG IF hndl& > 0                                 'valid handle?
>  scrapHndl&= FN ZEROSCRAP                          'delete contents
>  PICTlen&  = FN GETHANDLESIZE(hndl&)               'size of pict?
>  osErr     = FN HLOCK(hndl&)                       'lock handle
>  LONG IF osErr = _noErr                            'if no error
>  osErr = FN PUTSCRAP(PICTlen&, _"PICT", [hndl&]) :'put on clipbd
>  END IF
>  osErr     = FN HUNLOCK(hndl&)                     'unlock the handle
>  END IF
>  hndl& = 0
>END FN
>
>=====================================================
>Martin Fitzgibbons
>
>Email: ................ rush@...
>Web Site .............. http://www.illawarra.net.au/rush
>--
>To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>

____________________
Use e-mail with integrity.
Mark Goodes (wave@...)