When I click on a button in my program, it is supposed to open a program (say,
Notepad) - that I did, by opening Notepad as another process. using Process
class.
Clicking another button, my program should make "Hello World!" appear in notepad
it's previously opened.
How can I do that?
--
"It is easy in the world to live after the world's opinion; it easy in solitude
to live after our own; but the great man is he who in the midst of the crowd
keeps with perfect sweetness the independence of solitude."
Ralph Waldo Emerson, Self-reliance 1841
http://pinpoint.wordpress.com/
>I'm making a "hello world" program in C#, though a bit more complex one.
>
>When I click on a button in my program, it is supposed to open a program (say,
>Notepad) - that I did, by opening Notepad as another process. using Process
>class.
>
>Clicking another button, my program should make "Hello World!" appear in notepad
>it's previously opened.
>
>How can I do that?
You probably can't. What you can do is to open a new copy of Notepad
with a selected textfile loaded by including the name of the textfile
as an argument when you fire up Notepad:
ProcessStartInfo PSI = new ProcessStartInfo();
PSI.FileName = "notepad.exe";
PSI.Arguments = "hello.txt";
Process.Start(PSI);
rossum
"Sourcerer" <enl...@MAKNIgmail.com> wrote in message
news:ermc36$mdo$1...@ss408.t-com.hr...