Good morning all,
I am currently working on project for myself to make my life a bit easier and get job done a bit faster, but unfortunately I have faced an issue. My understanding of c# is not as advanced yet and I hope someone will be able to give me some sort of clue or solution.
To the point. Is there a way to copy data displayed in one program and paste it into another?
let's say:
program_1 - command line app where all my code is being implemented to
program 2 - windows form app ( this is an existing .exe file added as reference to program_1)
When starting program_1 this trigger specific option in program_2 and program_2 display result on screen. What I want to do is to automatically copy content displayed in program_2 and:
a) save outcome as .txt using program_1
or
b) sent outcome directly to e-mail address, also using program_1
I was trying to use TextBox. options, GetData(), but I must be missing something. I would be much grateful for any sort of help.
Code:
Process app = Process.Start("SalesReport.exe");
Thread.Sleep(10000);
TextBox textBox1 = new TextBox();
textBox1.SelectAll();
textBox1.Copy();
app.Kill();
this is just basic function to launch report, this displays the result as table in program_2.