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 / Icon for executable.

Author
Message
Durrandi
16
Years of Service
User Offline
Joined: 7th Apr 2008
Location:
Posted: 8th Apr 2008 05:00
Simple question: How do I set my own icon for the executable?

Also, all the links in the Newcomers FAQ no longer work.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Apr 2008 07:08
Yes they do

In the default IDE, look to the right. There should be a toolbar with some buttons like "Media" and "Cursors". Click on the one that says "Icons" and upload it there.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Apr 2008 08:16
the normal IDE won't allow you to add an icon ... and CodeSurge does but it makes the icon 16 colors only any idea why ?

Could you help me treat my injured Dino-Fly ?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Apr 2008 17:28
Quote: "CodeSurge does but it makes the icon 16 colors only "


That's funny, I've used some pretty complex icons and they haven't been distorted. Are you using .bmp s or .ico s?

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Apr 2008 19:07
WindowsKiller: everytime I try to upload an icon to the .EXE with the normal IDE, I recieve some weird error and the program either shuts down or it continues ... and I had this problem since 2006 so it's not a Windows error or something ... and I am using a proper .ico file

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Apr 2008 20:35
yeah I know that ... hmm what are the restrictions ??? anyway, just as a note, I used both my icons (created by me) AND commercial icons such as icons from games like Prince of Persia, GTA, etc. just to see if I'm doing something wrong ... any idea what's going on ?

Could you help me treat my injured Dino-Fly ?
Twu Kai
18
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 8th Apr 2008 21:27
I personally find that it works: I just saved it as a .bmp, and at either 16x16 or 32x32 (I tried both) and when I look at the exe, it has - instead of the normal pyramid - the image I made. I hope this is useful.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 8th Apr 2008 22:05
I use a 32x32 8-bit icon and the IDE doesn't add the file ... it gives me a fatal error and as I said, the problem is there for at least 2 years so it's not an OS error ... and CodeSurge adds it BUT instead of 256 colors, I see my icon being displayed using 16 colors

Could you help me treat my injured Dino-Fly ?
dan958
16
Years of Service
User Offline
Joined: 7th Feb 2008
Location:
Posted: 8th Apr 2008 23:20
Sorry, off topic!

Twinsen, you have got the character from my favorite game as a child as your avatar, LITTLE BIG ADVENTURE, lol...that game still wasnt as good as The Neverhood.
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 9th Apr 2008 07:25
dan958 hehe, I am making a new series of LBA using DBPRO
WindowsKiller, yes I have version 1.09b

Could you help me treat my injured Dino-Fly ?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Apr 2008 10:34 Edited at: 9th Apr 2008 10:36
When I want to create an icon I use the tool that comes with Delphi.

It only allows you to create an icon with 16 colours, so I guess that is the standard that DB uses because those I have created work fine even in the default IDE as Windowskiller says.

Try converting your icon to 16 colours - as opposed to using only 16 colours from a larger palette.

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 9th Apr 2008 13:15
but why such a low restriction ??? at least 256 colors would be nice ... you imagine how bad an icon looks in 2-bits ???

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 9th Apr 2008 16:54
lol I screwed up the bits 2 means B&W anyway, what's the deal then ??? is DBPRO allowing 16 colors only and you can trick it to accept higher coloured ones OR it does accept them but due to a bug, it converts them to 4 bit ???

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 9th Apr 2008 21:39
hmm yeah but 1bit and 2 bit are the same regarding depth ... even IrfanView uses B&W when in 2-bit mode ... 2 bit has 2 tints of gray I believe compared to the standard 1-bit which is pure back and pure white ... but I might be wrong

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 10th Apr 2008 14:51
yes, grayscale I forgot the term ... that's what I meant by "2 tints of gray and black and white" ... anyway, so why is this limitation there ??? is it really so hard to allow 8-bit icons ???

Could you help me treat my injured Dino-Fly ?
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 10th Apr 2008 15:42
The icon is one of the first things set in a Windows application, and you must use an icon that is compatible with how the window will be used. (i.e. It must be able to be put in the titlebar, on the system tray, and in the switch process dialog you get when you alt-tab.)

By default, Windows wants a 32x32 bitmap which is at least 4 bits in depth (16 colors). You can certainly use what is essentially a monochrome icon, but it must be saved as 32x32 16+ colors. Same thing goes for grayscale. The reason has more to do with using the standard Windows palette. Historically, that's been about all Windows can count on being available. The size relates to using a small version...like a mip-map...sort of.

Anyway, the window class is where you would change that, and DBPro does use the icon you provide...provided that it is in the proper format. If it doesn't, then you've probably got the wrong size, or number of colors.

To expect DBPro to have much flexibility in this regard is not realistic, since the icon is part of the (non-DX) Windows application proper, and not at all related to game programming. It uses my avatar icon with no trouble at all. It is 32x32x256 (BMP saved as ICO, right out of MSPaint).
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 10th Apr 2008 17:11
yes but I think you've misread .. I use a 32x32 8-bit color and it gets transformed to a 32x32 4-bit one ... that is what really bugs me

Could you help me treat my injured Dino-Fly ?
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 10th Apr 2008 17:23 Edited at: 10th Apr 2008 17:30
No, I read right. Post it up, and I'll fix it for you, and it will work. You are likely trying to use a DDB, and you need a DIB.

edit:
See, a DDB has no color table, and you must use a 24/32-bit BMP to make that work.

A DIB has a color table (palette).

You are getting the best Windows can muster using only its internal 20 color table....count your colors. You probably have 20, not 16.
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 10th Apr 2008 18:37
hmm what do you mean by DDB and DIB ??? are these file formats or what ??? seems interesting, please explain

Could you help me treat my injured Dino-Fly ?
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 10th Apr 2008 19:01 Edited at: 10th Apr 2008 19:24
DDB = Device Dependent Bitmap
DIB = Device Independent Bitmap.

A DIB has a color table, a DDB does not. The format of bitmaps of less than 24 bits uses a color table, and the data is just the color table entry. That is how you can get any 16 colors in the same format. The data is just a lookup into the color table.

At 24 bits, DDB and DIB are the same, there is no color table, only RGB values for each pixel.

Login to post a reply

Server time is: 2024-09-27 12:27:32
Your offset time is: 2024-09-27 12:27:32