Solved

embedding stuff

Posted on 1998-11-16
8
182 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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