944,183 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 8666
  • C# RSS
You are currently viewing page 1 of this multi-page discussion thread
Jan 23rd, 2006
0

PLEASE HELP about Using C# to add an executable file to my program!

Expand Post »
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 ;
C# Syntax (Toggle Plain Text)
  1. **************************+---+
  2. * My Prog v.0.01 | |
  3. --------------------------+--\\
  4. * *\\
  5. * +---------------------+ * \\
  6. * |The Prog v.9.91 | * \\
  7. * +---------------------+ * \\
  8. * | | * \\ |
  9. * | | * \\ |
  10. * | | * -------
  11. * | | * My Program
  12. * | | *
  13. * | | *
  14. * | | *
  15. * | | *
  16. * | | *
  17. * | | *
  18. * | \ | *
  19. * | \\ | *
  20. * +-------------------\\+ *
  21. * \\ *
  22. * \\ *
  23. *******************************
  24. \\
  25. \\ |
  26. \\|
  27. -----+The program that i
  28. want to run in my
  29. program
i'm a new programmer =D if you help me i'll be very happy Thanks for read... :o
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MoriEdan is offline Offline
10 posts
since Jan 2006
Jan 23rd, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to 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.

Quote 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 ;
C# Syntax (Toggle Plain Text)
  1. **************************+---+
  2. * My Prog v.0.01 | |
  3. --------------------------+--\\
  4. * *\\
  5. * +---------------------+ * \\
  6. * |The Prog v.9.91 | * \\
  7. * +---------------------+ * \\
  8. * | | * \\ |
  9. * | | * \\ |
  10. * | | * -------
  11. * | | * My Program
  12. * | | *
  13. * | | *
  14. * | | *
  15. * | | *
  16. * | | *
  17. * | | *
  18. * | \ | *
  19. * | \\ | *
  20. * +-------------------\\+ *
  21. * \\ *
  22. * \\ *
  23. *******************************
  24. \\
  25. \\ |
  26. \\|
  27. -----+The program that i
  28. want to run in my
  29. program
i'm a new programmer =D if you help me i'll be very happy Thanks for read... :o
Reputation Points: 11
Solved Threads: 0
Newbie Poster
sfbell is offline Offline
13 posts
since Jan 2006
Jan 23rd, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

Thank you for your reply sfbell;
But i don't want to run a executable file as a new process i want to run it in my program (inside of my program's frame)
Thank you again for your relation...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MoriEdan is offline Offline
10 posts
since Jan 2006
Jan 23rd, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

Is this a windowed application? and is the program you want to run inside the frame already compiled?
Reputation Points: 11
Solved Threads: 0
Newbie Poster
sfbell is offline Offline
13 posts
since Jan 2006
Jan 23rd, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

Absolutely yes. i've a windowed application code in c# and i want to run a program which is already compiled, inside the frame of my program
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MoriEdan is offline Offline
10 posts
since Jan 2006
Jan 23rd, 2006
1

Re: PLEASE HELP about Using C# to add an executable file to my program!

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.
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006
Jan 24th, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

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
Reputation Points: 23
Solved Threads: 16
Posting Whiz in Training
plazmo is offline Offline
206 posts
since Aug 2005
Jan 24th, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

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:
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MoriEdan is offline Offline
10 posts
since Jan 2006
Jan 24th, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

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.
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006
Jan 27th, 2006
0

Re: PLEASE HELP about Using C# to add an executable file to my program!

i know all of them! i'll not change the LICENSE or COPYRIGHT part of the program or i'll not disable them. i jsut want to serve that program in to my program.... Like a patch! i think it's legal. isn't it?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MoriEdan is offline Offline
10 posts
since Jan 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C# Forum Timeline: forms
Next Thread in C# Forum Timeline: C#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC