Solved

embedding stuff

Posted on 1998-11-16
8
181 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

947 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now