Change the .EXE file Icon??

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
mundofr
Coder
Posts: 34
Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:

Change the .EXE file Icon??

Post by mundofr »

okay, maybe this has nothin to do with Qbasic but well, i gotta ask :D

i was wondering if any1 kno how to change the icon of the .EXE file once u r done with the game or program :D well, thats all, and i kno it has nothing to see with QB :d
<b><i> "Rock is the first thing in life, after rock comes the comp...." Rock on Big M</i></b>
<img src="http://www.freewebs.com/mundofr/bigm2.bmp">
User avatar
Levi
Veteran
Posts: 79
Joined: Tue Jul 27, 2004 11:44 pm
Location: Alone and forgotten
Contact:

Post by Levi »

Ummm...if it's made with QB. I believe you can right-click. Go to the properties. Then somewhere there's an option to change the ICON. I don't know really. I use to do it myself somehow. But whether or not that's because I was changing the ICON of a shortcut file or changing the actual icon I don't remember.
Later days,
Matthew

May those who love us love us
And those who don't
May the good Lord turn their hearts
And if he doesn't
May he turn their ankles
So we'll know them by their limping
-Irish prayer
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Saddly.. As far as I can see and tested you can't.. You can make a short-cut and change its icon...

You do this by "Right" clicking the file,. puch in "Properties" from the list, and then "Change Icon" on the menu somewhere,. Then browse for the set you want...

I got a set I downladed of funny little Nerds (The Willy Wonker candy),.. like a calc proggy Im doing in FB uses one with a Nerd in a sailboat,. hehe,. looks funny... :wink:

http://members.aol.com/rattrapmax6/fbfi ... ulator.zip
^^ If you'd like to see it, its in EXE form... :wink: Few bugs to work out, but still, very cool.. hehe....
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Kyle
Veteran
Posts: 107
Joined: Thu Apr 14, 2005 2:41 pm

Post by Kyle »

Because of the different structure between the DOS EXE and the NE (Windows) EXE, I'm 99% sure you can't do it. DOS executables don't have a space for an icon, as it is a text-based system. I suppose you can add an icon to an FB EXE with resource hacker or something.
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Post by Pete »

Yeah, with DOS EXEs you can't change the icon.

However, you can create a Windows shortcut to the DOS EXE and use whatever icon you want.
User avatar
mundofr
Coder
Posts: 34
Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:

Post by mundofr »

yeah, well i actually downloaded a game called "LINE"(not a very good one) and it had a icon.. i dont think this is even posibble but who knows?
<b><i> "Rock is the first thing in life, after rock comes the comp...." Rock on Big M</i></b>
<img src="http://www.freewebs.com/mundofr/bigm2.bmp">
Plasma

Post by Plasma »

This has actually been on my to-do-and-show-people-it-is-possible list for a while. ;) I've finally worked out the details tonight; expect to see a proof-of-concept in a few days.
Plasma

Post by Plasma »

As promised:

http://www.phatcode.net/stuff/dos_icon.zip

Good old QBASIC with an icon :D
User avatar
Kyle
Veteran
Posts: 107
Joined: Thu Apr 14, 2005 2:41 pm

Post by Kyle »

Wow and how? Somehow you have converted it to a Windows EXE. Interesting..
anarky
Coder
Posts: 37
Joined: Mon Apr 18, 2005 11:57 am
Location: Australia
Contact:

Post by anarky »

OMFG!!!

You don't realize the impact this has had on my development! I can now use QB in XP! No mouse / keyboard problems now! ????

>anarky - Dumbfounded and amazed.
User avatar
mundofr
Coder
Posts: 34
Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:

Post by mundofr »

Wow! thanks for the demo plasma, i was just wondering how'd u make that heh thanks
<b><i> "Rock is the first thing in life, after rock comes the comp...." Rock on Big M</i></b>
<img src="http://www.freewebs.com/mundofr/bigm2.bmp">
Plasma

Post by Plasma »

All Windows (NE or PE) executables have a DOS "stub" program at the beginning. Usually this is just a small program that displays "This program cannot be run in DOS mode" or something similar. Some linkers let you specify your own DOS stub, which can actually be any DOS program. There is no size restriction.

So what I did was create a small win32 program that loads and executes the DOS stub of itself, and then I used qbasic.exe for the stub. When run under DOS, the stub executes, and the win32 program is ignored. When run under Windows, the win32 program loads and runs the stub. Since the executable is technically a PE, adding an icon is easy.

When I get some more time, I'll try to make a toolkit with this so you can add icons to your own exes.

To anarky: The win32 stub loader I wrote sets the child process priority to low. This is probably what fixes your problem. You can try this with "normal" DOS programs by changing the NTVDM priority to low in the Windows Task Manager once you have started your DOS program.
User avatar
mundofr
Coder
Posts: 34
Joined: Sat Apr 16, 2005 9:11 pm
Location: IN, USA
Contact:

Post by mundofr »

:D Thanks
<b><i> "Rock is the first thing in life, after rock comes the comp...." Rock on Big M</i></b>
<img src="http://www.freewebs.com/mundofr/bigm2.bmp">
Brandon

Hurry

Post by Brandon »

:D I am Brandon a GUI programer from NY.I only have WinXP on my PCs and QB doesn't always work right in it so I would like to make QB4.5 work like it was a Windows app!! :D

http://jacobpalm.dk -I am here most of the time.
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

THe only compiler that gives me problem on startup is a message is the QB P.D.S. so could someone please make it a windows app? ;-)....been bugging me since I installed XP lol
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
User avatar
The Walrus
Veteran
Posts: 87
Joined: Fri Apr 01, 2005 7:19 am
Location: Denmark
Contact:

Post by The Walrus »

Plasma wrote:When I get some more time, I'll try to make a toolkit with this so you can add icons to your own exes.
You can sign me up for a copy of that when it's done :P
If swimming is so good for your figure, how do you explain walruses?
MystikShadows
Veteran
Posts: 703
Joined: Sun Nov 14, 2004 7:36 am
Contact:

Post by MystikShadows »

I'm with the dude with the pointy teeth here...sign me up to...and to your fan letter ;-) lol
When God created light, so too was born, the first Shadow!

MystikShadows

Need hosting? http://www.jc-hosting.net

Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
DrV
Veteran
Posts: 63
Joined: Thu Jun 02, 2005 9:44 pm

Post by DrV »

Cool! Wondering why you used PKLite on it, though... was that just to make it smaller? It no longer has the icon when I unpacked it, but it still runs as normal.
Guest

Post by Guest »

Whoah I almost forgot about this thread... :P

The original QBASIC.EXE (v1.1) was packed with PKLITE, I didn't change anything there.

I already fixed the PDS warning message with my XP floppy patch.

Here's the QB 4.5 IDE "iconized" for anybody who wants it: http://www.phatcode.net/stuff/qb45_icon.zip

I'll finish the loader kit after EMS Magic, probably 1-2 more months.
Post Reply