Solved

embedding stuff

Posted on 1998-11-16
8
183 Views
Last Modified: 2010-04-30
ok, for example a splash screen for your program.  you want a picture on your splash screen, instead of having a picture sitting somewhere in a directory where the program looks for it to display it onto the splash screen, is there some way to embed it into the executable so the picture doesn't have to be sitting 'loose' somewhere on your harddrive?
0
Comment
Question by:gonad
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:eab111098
ID: 1445073
You're going to have to explain yourself a little better. i haven't a clue as to what you're trying to achieve.
0
 

Author Comment

by:gonad
ID: 1445074
Edited text of question
0
 
LVL 1

Expert Comment

by:eab111098
ID: 1445075
I think I know what you're looking for. If you're trying to "hide" a pix from being "stolen" when you're program is distributed then it can't be done to my knowledge. Besides, trying to hide a splash screen can be easily broken even if you were able to hide it in an executable. While loading, simply click on Control->Print Screen buttons and then bring the image up in you're favorite graphix program with a simply paste from the clipboard.  

on the other hand, you could convert the pix to bit or hex numbers and assign them to constants in your program. i don't recommend this but it can be done.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:gonad
ID: 1445076
yeah, i wasn't necessarily trying to hide it rather than just having the executable instead of messy directories full of pictures.  although the latter option you gave may make my executable somewhat larger, I think I will try it, if it works to my satisfaction I will let you know and you can submit answer and grab your points.
0
 
LVL 1

Expert Comment

by:eab111098
ID: 1445077
Have you ever done that before? Every pixel has to be converted to a bit or hex number in 8, 16, or 32 bit depending on the pix and then each of them have to be assigned to constant (array i recommend). That's a lot of GD numbers to type in. Basic used to have the DATA/READ pair you could use similar to the fortran data/read pair, but MS got rid of them with the introduction of vb3 (i think it was or maybe it was vb for dos). good luck.
0
 

Author Comment

by:gonad
ID: 1445078
yeah, i wasn't necessarily trying to hide it rather than just having the executable instead of messy directories full of pictures.  although the latter option you gave may make my executable somewhat larger, I think I will try it, if it works to my satisfaction I will let you know and you can submit answer and grab your points.
0
 

Author Comment

by:gonad
ID: 1445079
oops, accidently readded that comment, ack.  I will leave this question open for a bit just in case someone has done this some other way.  I will take a look around myself and hopefully I can find something easier than manually mapping the entire picture, heh.  thanks for your input eab
0
 
LVL 1

Accepted Solution

by:
wdeem earned 10 total points
ID: 1445080
Put the picture in a VB PictureBox on your splash screen form. VB will create an .frx source file that matches the .frm file containing your splash screen form. The .frx file is not shown anywhere in VB but you can see it in the directory where your .frm file is stored.

Compile the executable and the picture will be hidden inside the .exe file.

If you add additional pictures to the splash screen, VB will keep them all in the same .frx file. If you remove all of the pictures, VB will delete the .frx file.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question