mjb3030 Posted August 21, 2003 Posted August 21, 2003 Is there some way to include an image with a compiled EXE? If not, is there any other way to create a form with a background image that can be distributed as exe only? Quote
*Experts* Nerseus Posted August 21, 2003 *Experts* Posted August 21, 2003 If you set the Form's background image property it will embed the image for you in the EXE. Otherwise, you can include a binary file in your project (a BMP for instance), change it's property to embedded resource, and "load" it at runtime to set as the Form's background. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
*Experts* Bucky Posted August 22, 2003 *Experts* Posted August 22, 2003 ... and "load" it at runtime to set as the Form's background. Accomplished via: Me.BackGroundImage = Image.FromStream([Assembly].GetExecutingAssembly().GetManifestResourceStream("image filename goes here")) Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
mjb3030 Posted August 22, 2003 Author Posted August 22, 2003 Thank you both. I am now moving in the right direction. I'm still not quite getting it, but I think that is because I still need to gain a better understanding of assemblies and embedded resources. I have no trouble doing this in Visual Studio, but I am trying to also learn to do everything in straight code in Notepad because I want to be able to fully grasp what is going on behind the scenes. Quote
wyrd Posted August 22, 2003 Posted August 22, 2003 The easiest way to understand how the .NET framework is put together is to browse through the Object Browser. Visual Studio doesn't hide any of the source code from you, it just adds a little to save you the typing. It has to many advantages to ignore (intellisense and debugger just to name a couple). Quote Gamer extraordinaire. Programmer wannabe.
mjb3030 Posted August 22, 2003 Author Posted August 22, 2003 I know, but I feel that I have been learning faster since I began using this "basic" approach because it is forcing me to write all the form code myself rather than relying on the IDE. Eventually, I am going to switch back to using VS after I feel very comfortable with the code. However, I also want to learn all about compiling and packaging inside and out without having to rely completely on VS or MSI. I am a rather competent VB6 programmer, but I never learned enough about deployment to be able to fix anything more serious than a basic "missing dll" kind of installation error. I want to avoid making that mistake with .NET. I guess I'll be checking out the Deployment Forum before this thread gets moved because I've strayed too far off topic! Thanks again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.