Page 1 of 1

Change the .EXE file Icon??

Posted: Fri Apr 22, 2005 4:19 pm
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

Posted: Fri Apr 22, 2005 4:57 pm
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.

Posted: Fri Apr 22, 2005 5:03 pm
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: ...
^^ If you'd like to see it, its in EXE form... :wink: Few bugs to work out, but still, very cool.. hehe....

Posted: Sat Apr 23, 2005 12:27 pm
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.

Posted: Sat Apr 23, 2005 1:44 pm
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.

Posted: Sat Apr 23, 2005 7:21 pm
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?

Posted: Sun Apr 24, 2005 1:54 am
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.

Posted: Tue Apr 26, 2005 11:14 pm
by Plasma
As promised:

Good old QBASIC with an icon :D

Posted: Thu Apr 28, 2005 2:12 pm
by Kyle
Wow and how? Somehow you have converted it to a Windows EXE. Interesting..

Posted: Fri Apr 29, 2005 9:37 am
by anarky

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.

Posted: Fri Apr 29, 2005 4:51 pm
by mundofr
Wow! thanks for the demo plasma, i was just wondering how'd u make that heh thanks

Posted: Mon May 02, 2005 5:47 pm
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.

Posted: Tue May 03, 2005 7:28 am
by mundofr
:D Thanks


Posted: Wed Aug 10, 2005 2:04 pm
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 -I am here most of the time.

Posted: Wed Aug 10, 2005 2:18 pm
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

Posted: Wed Aug 10, 2005 3:57 pm
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

Posted: Wed Aug 10, 2005 8:13 pm
by MystikShadows
I'm with the dude with the pointy teeth here...sign me up to...and to your fan letter ;-) lol

Posted: Thu Aug 11, 2005 3:51 pm
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.

Posted: Tue Sep 06, 2005 11:50 pm
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:

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