| | |
PLEASE HELP about Using C# to add an executable file to my program!
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2006
Posts: 8
Reputation:
Solved Threads: 0
How can i add a executable program to my program and run the executeable file in to my program and the program starts with my program :cry:
The shape like this ;
i'm a new programmer =D if you help me i'll be very happy Thanks for read... :o
The shape like this ;
C# Syntax (Toggle Plain Text)
**************************+---+ * My Prog v.0.01 | | --------------------------+--\\ * *\\ * +---------------------+ * \\ * |The Prog v.9.91 | * \\ * +---------------------+ * \\ * | | * \\ | * | | * \\ | * | | * ------- * | | * My Program * | | * * | | * * | | * * | | * * | | * * | | * * | \ | * * | \\ | * * +-------------------\\+ * * \\ * * \\ * ******************************* \\ \\ | \\| -----+The program that i want to run in my program
Well, if you are planning to just have the second program run, you can call it using:
using System.Diagnostics;
...
Process myProc;
// Start the process.
myProc = Process.Start("filename");
//The process does something.
...
// Stop the process.
myProc.CloseMainWindow();
*code from http://www.codeguru.com/forum/archiv.../t-181653.html
It takes filename (your executable) and starts it as a new process.
using System.Diagnostics;
...
Process myProc;
// Start the process.
myProc = Process.Start("filename");
//The process does something.
...
// Stop the process.
myProc.CloseMainWindow();
*code from http://www.codeguru.com/forum/archiv.../t-181653.html
It takes filename (your executable) and starts it as a new process.
•
•
•
•
Originally Posted by MoriEdan
How can i add a executable program to my program and run the executeable file in to my program and the program starts with my program :cry:
The shape like this ;
i'm a new programmer =D if you help me i'll be very happy Thanks for read... :oC# Syntax (Toggle Plain Text)
**************************+---+ * My Prog v.0.01 | | --------------------------+--\\ * *\\ * +---------------------+ * \\ * |The Prog v.9.91 | * \\ * +---------------------+ * \\ * | | * \\ | * | | * \\ | * | | * ------- * | | * My Program * | | * * | | * * | | * * | | * * | | * * | | * * | \ | * * | \\ | * * +-------------------\\+ * * \\ * * \\ * ******************************* \\ \\ | \\| -----+The program that i want to run in my program
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
Can i ask why? Is the new program an enhancement of the old? Or is the new program using some features of the old? Either way i would make the old program a class library and then it (or parts of it) can be used by many other programs.
Dont be fooled by the fact that you have a UI in the program so it cant be a class library. Hardly any of my .exe files have any UI in them, they are mainly to hold the main controller (i strongly advise looking up the MVC pattern) which then calls various UI's and other libraries depending on the application, the client, the user etc. So much more flexible for now and the future.
Dont be fooled by the fact that you have a UI in the program so it cant be a class library. Hardly any of my .exe files have any UI in them, they are mainly to hold the main controller (i strongly advise looking up the MVC pattern) which then calls various UI's and other libraries depending on the application, the client, the user etc. So much more flexible for now and the future.
you can add the program into yout app as content then extract it and run it with the above mentioned way
u just add the file to your project like any other file then change the build action to content. im noto sure if you can call it directly from the program. i would normaly use this for images and such. but im perdy sure then you can then extract it out of your application
u just add the file to your project like any other file then change the build action to content. im noto sure if you can call it directly from the program. i would normaly use this for images and such. but im perdy sure then you can then extract it out of your application
•
•
Join Date: Jan 2006
Posts: 8
Reputation:
Solved Threads: 0
Thank you all for your reply's;
At first i want to explain why i wanna do this, it may be answer to f1 fan's question, i find a program that i think it can powers my project, i couldent find the program's source and i said i'm a new programmer at my first message. The program that i find and which can powers my project is so complex so i cant build a program like this at that level. So i want to run this program like a part of my program! (i dont want someone do that program for me
)
f1 fan; i understand that you mean if you were me you add the program as a class library but it doesnt work as a class library or i faild to do that. I have to find a way to run my program as a file browser (like web browser)
plazmo; I already can run the program out of my application, i can add the program as a content but i can't call it :cry: yeah i know i'm a bad programmer in fact i'm not a programmer! sorry for take up your time! i'm a hopeless event! :o
Thanks for all again!... :rolleyes:
At first i want to explain why i wanna do this, it may be answer to f1 fan's question, i find a program that i think it can powers my project, i couldent find the program's source and i said i'm a new programmer at my first message. The program that i find and which can powers my project is so complex so i cant build a program like this at that level. So i want to run this program like a part of my program! (i dont want someone do that program for me
)f1 fan; i understand that you mean if you were me you add the program as a class library but it doesnt work as a class library or i faild to do that. I have to find a way to run my program as a file browser (like web browser)
plazmo; I already can run the program out of my application, i can add the program as a content but i can't call it :cry: yeah i know i'm a bad programmer in fact i'm not a programmer! sorry for take up your time! i'm a hopeless event! :o
Thanks for all again!... :rolleyes:
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
so you are saying the other program is not yours? But you want to use it in yours? Just one word - LICENSE! No programmer in their right mind is going to grant you a royality free license to do that. You either bought the program yourself so if you keep redistributing it then you are "stealing" from the original developer or you downloaded it which possibly was illegal depending on the source, or the program was freely available but for your use only. If someone releases a program with no source code it means they dont want you to know how they did it. There are ways of getting the source, but i am not going to give them away in here.
In a nutshell you are breaking licensing and probably copyright laws and that (in any country) is a serious offence.
I make my living in IT and i would not hesitate for one second to bring the full force of the law down on anyone profiting from my work. I have staff to pay who have families to feed and you are stealing from them! On saying that, i developed a licensing and anticopying mechanism for just such occassions which works with any .net application with just 3 lines of code.
In a nutshell you are breaking licensing and probably copyright laws and that (in any country) is a serious offence.
I make my living in IT and i would not hesitate for one second to bring the full force of the law down on anyone profiting from my work. I have staff to pay who have families to feed and you are stealing from them! On saying that, i developed a licensing and anticopying mechanism for just such occassions which works with any .net application with just 3 lines of code.
![]() |
Other Threads in the C# Forum
- Previous Thread: string split
- Next Thread: Prevent a registry key from deletion
| Thread Tools | Search this Thread |
.net access algorithm alignment array barchart bitmap box broadcast buttons c# c#gridviewcolumn check checkbox client combobox communication control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing elevated encryption enum event excel file focus forloop form format forms function gdi+ hospitalmanagementsystem httpwebrequest image index input install java label list listbox localization login mandelbrot math messagebox mouseclick mysql operator path photoshop picturebox pixelinversion plotting pointer post programming radians read regex remote remoting richtextbox server sleep socket sql statistics stream string stringformatting sun table text textbox thread time timer update usercontrol validation visualstudio webbrowser whileloop windows winforms wpf xml





