Solved

embedding stuff

Posted on 1998-11-16
8
180 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

744 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

11 Experts available now in Live!

Get 1:1 Help Now