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 / Can't load a Bitmap HELP!

Author
Message
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 26th Apr 2013 04:55
I can't seem to load a bitmap on Darkbasic Pro on my windows 8 computer nor windows 7 laptop. How would you fix that?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th Apr 2013 15:03
* Is the file in the correct place?
* Is it actually a bmp file and not something else like png or gif?
* Can you open the bmp file with windows?
* Are you doing anything stupid in your code?

Post your code. There could be a million things wrong, and we have nothing to go with.

This is the code I'd use, provided the bmp file is in the same folder as your project.



TheComet


Level 91 Forumer - 9600 health, 666'666 keystroke power (*2 coffee)
Abilities: sophisticated troll, rage
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 26th Apr 2013 23:32
Here is the code snipet I use

LOAD BITMAP "earth.bmp", 1
COPY BITMAP 1, 0
Wait key


Also I can open the thing on computer. Plus I know that I have it because I checked.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Apr 2013 01:43
What goes wrong exactly? That snippet works fine for me.
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 27th Apr 2013 06:16
Okay, what happened is that my two stupid computers (windows 8/7) are not loading a bitmap that I want to load. It always says "can not load bitmap at line (what ever line it is)".

I always type in this code.

LOAD BITMAP "earth.bmp", 1
COPY BITMAP 1, 0
Wait key

I already know that it exist because I checked. I also set DBPro to administrator but it still won't work. So people, PLEASE HELP!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Apr 2013 13:22
The file may exist but is it in the right place? Is it in the same folder as the program's .dbpro and .dba files for example? Browse to the folder containing these files, take a screenshot and post the screenshot here. We might be able to help you then.

If you simply entered that code into dbpro and ran it then dbpro is probably assuming the bitmap is in whatever default location it uses for projects.

Whenever I start a new project I do the following in this order:

1. Open DBPro.
2. Use Save Project As to save the project in a sensible location with a sensible name.
3. Use Save As to save the source code (you can do this before you've entered your own code) in the same folder and with a sensible name (I usually use the same name apart from the .dba extension as the project but you don't need to).
4. Make sure your images and other media are in the same folder.
5. Enter your code, compile and run, etc.

Login to post a reply

Server time is: 2024-04-23 18:27:21
Your offset time is: 2024-04-23 18:27:21