How do I compile from the application?

andycharger

Centurion
Joined
Apr 2, 2003
Messages
152
Hi,
Im just building a small application in VB.net and Im a bit stuck.
Its a simple form with 2 buttons on it. I now want to compile it (if that is the correct term) so I can make an EXE and others can use it. Ive search tutorials and seen mentions of command line compilers but can anyone tel lme exactly how I do it and if it can al lbe done form Studio.net without using the command prompt?

Any help with be very much appreciated.
 
Your application is fully compiled whenever you press Run, you'll find your exe in the bin subdirectory of the directory with all the project files in.
 
yeah,

but i got a question to add to that..

in vb6, does it include the images with your application when you hit MAKE EXE. or do u have to still put them in the subdir?

in .net u gotta distribute the images(im making a game) with your application in order to make it work. How do i distribute my app without including the source. if i dist. only the EXE file, it will say, "image not found", but if i distribute the app with the source, it will find the image
 
add existing item to your project (your image)
make the files Build Action - Embedded Resource.
then you will need to do this:
C#:
//Path is the namespace of your project . the image name.
//Ex:  "MyNamespace.Image1.jpg"
//If you created a folder in the soloution and put you pictures in that:
//"MyNamespace.Folder1.Image1.jpg"
Stream s= System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(Path);
//Then you can create the image from the stream.
Image.FromStream(s);
 
Last edited:
Back
Top