Click to See Complete Forum and Search --> : Icons in EXE's


Big Nasty
February 20th, 2000, 03:55 AM
How can i place multiple icons for my program in the programs EXE file?

Lothar Haensler
February 21st, 2000, 01:40 AM
create a .RES file and add it to your VB project.
You can create a RES file by using the Resource Compiler (rc.exe) that comes with VC6.

AndyK
February 21st, 2000, 02:23 AM
you can also use (Microsoft Visual Studio) Micorosoft developer studio, and create .res from there, or you can use notepad to create files (just save file with extenction *.res) and if you have MS Developer Studio installed, .res file's icon should look like gray, riped file, double click it, which will take you to designer window where you can add sounds, tables, any pics, custom data, icons, cursors, etc....

Lothar Haensler
February 21st, 2000, 02:29 AM
>you can use notepad to create files (just save file with extenction *.res)

Please tell use more about that.
Are you saying that you can type Resource statements into notepad, save it as .RES file and add it to your VB project?
what version of VB do you use?

>you can also use (Microsoft Visual Studio) Micorosoft developer studio, and create .res from there

how would that work? I know how to do that in VC, but, if you look at the makefile it uses, you will find calls to RC.EXE...

AndyK
February 21st, 2000, 01:46 PM
Goto notepad, after running the notepad you will get blank text file, save it as Untitled.res (it's already untitled, you just have to add .res) then after saving it as .res, you could double click on that file that you just have saved, and it will take you to MS Developer studio....and you will see your .res file empty, now you can start adding any image files, sounds, string tables, cursors, icons, etc. I use VB5 but i got my hands on Visual Studio 97, which i get to use as learning, so i added all my pictures into that res file, saved it and I don't even need to use GIF Animator code to play animated files. I use loadrespicture to get my image animated:


for z = 0 to 16
s = s + 1
If s = 15 then s = 0
Image1 = LoadResPicture(101 + s, vbResBitmap)
Pause 0.1
next z



Easy, and no dumb GIFs

Lothar Haensler
February 22nd, 2000, 01:43 AM
>Goto notepad, after running the notepad you will get blank text file, save it as Untitled.res (it's already untitled, you just have to add .res) then after saving it as .res, you could double click on that file that you just have saved, and it will take you to MS Developer studio....and you will see your .res file empty, now you can start adding any image files...

While that may be true, I think it's an unnecessarily long detour.
You could as well just start DevStudio and select File/New/Resource Script file or Resource Template.

Atlantisoft
February 22nd, 2000, 06:59 AM
2 things:

1. how do i add the .res file to my vb project?
2. when i load the empty .res file that i made in notepad it gives me an error. "cannot find c:\my documents\untitled.res or one of it's components. make sure all libraries are available". what do i do?

Lothar Haensler
February 22nd, 2000, 07:17 AM
>1. how do i add the .res file to my vb project?
right-click in Project Explorer on your project file and select Add/Add File... and select the RES file.


>2. when i load the empty .res file that i made in notepad it gives me an error. "

I still don't believe that it makes any sense at all to create an empty ".RES" file with notepad.
You can create it via DevStudio, or by creating a Resource script file (.rc) and compile it via RC.exe

Atlantisoft
February 22nd, 2000, 07:23 AM
ok, i've opened visual c++ and made a new resources script file......now what? where do i put in the images/sounds/cursors/icons etc

Lothar Haensler
February 22nd, 2000, 07:34 AM
choose Insert/Resource from the menu in VStudio 6.

AndyK
February 22nd, 2000, 09:42 AM
I still can't get why you get errors while trying to make the .res file with Notepad. I make all my .res files with notepad and then just double-click it....use drag-and-drop to add images, cursors, etc.(i never added sounds that way before, but it should work too if you are trying to add the sound)
also to add .res file, just drag-and-drop the .res file over Project-Explorer window in VB...

February 22nd, 2000, 03:30 PM
This is not a reply, I have a question, how do I run the program I made in VB like I would any other executable file?

AndyK
February 22nd, 2000, 03:45 PM
Compile to the .exe and double-click it!!! Or if you want to internaly execute....just press play button named "RUN"