Skip to content

How to create an exe file form my program

oldbrother8

Asked Mar 10, 2005, 2:16 PM EST5 answers
Share
LinkedInX
I want to create an exe file from my own program, how can I do it? For example, I have a program App1. I run this program, and choose one picture form my local disk, then I input some comments into a input box. After that, I click the button "Create", A new exe file App2.exe will be created. If I run this program App2, I will see that the picture is displayed as the background of a pictureBox, the comments will be displayed also. How can I do this? My English is bad. Hope you have explained what is my question. Good luck to you all!

5 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi, Well this will get you started. http://www.codeguru.com/Csharp/Csharp/cs_syntax/reflection/article.php/c5881/ and look at this. http://www.c-sharpcorner.com/1/ExeOnFlyKunal.asp --> replace the System.Runtime.Emit to System.Reflection.Emit! Have fun. Cheers.
    0
  • 0
    By the way, You can do the other way. You can autogenerate C# scripts just say, when you load a picture, it will generates a set of c# code behind the scene. Once you are ready to generate the code, you can use CodeDom to compile the C# codes. Hope it helps. Cheers.
    0
  • 0
    Thank you very much for your reply. your suggestion is very helpful. Acctually, my problem is more like a problem to write a picture-to-exe program. But I need add more informations such as text, voice into the generated exe file. I tested the code "create exe on the fly", and I changed the "runtiome" to "reflection". But there are still problems.Is it possible for me to find some other source code? Thanks a lot!
    0
  • 0
    Hi, Today is weekend. I do not have any vs.net installed at home. Do you mind to wait till Monday? I can try to come out a simple program for you. But i cannot guarantee you a solution ok, in case i have piles of work to do back in office. Will try :) I prefer you to look at the 1st url on my previous post ... Cheers.
    0
  • 0
    Sorry, I just come back. You are so kind! I would appreciate it if you can send me the program to my email: [email protected] Have a nice weekend!
    0