Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Cannot Get Image

Author
Message
KillaStatic
15
Years of Service
User Offline
Joined: 8th Jul 2009
Location:
Posted: 8th Jul 2009 08:29
My Images are added Media. When i run the program i get.
RunTime Error 504 - Cannot grab image due to illegal area at Line 10


Heres my code:

What's the problem?
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Jul 2009 14:04
one of the images or bitmaps is smaller than your grab area. could be the last bitmap loaded.

Dark Physics makes any hot drink go cold.
KillaStatic
15
Years of Service
User Offline
Joined: 8th Jul 2009
Location:
Posted: 9th Jul 2009 23:36
i want to grab from the image not from the window
darkvee
18
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 14th Jul 2009 01:05
Hi KillaStatic

try this code it makes everything easier.



Vee
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 14th Jul 2009 03:09
When you use LOAD IMAGE you're loading the image directly into the program. When you use LOAD BITMAP the number at the end is the bitmap number which creates that bitmap at the resolution of the file loaded and switches to that bitmap as the current working screen. Image #1 is already loaded in memory so you don't need to grab it... but since you use LOAD BITMAP you do need to put down SET CURRENT BITMAP 0 to change the current working screen to the main view screen... otherwise you'll be stuck working on a screen the user never sees.

Here's what your code is doing... see attached image too:


Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-28 08:25:08
Your offset time is: 2024-09-28 08:25:08