I'm using the C# client hooking sample that was kindly given to the community by IamHawtness but I have been trying to convert it to a GUI rather than a console.
I understand the simple part of adding buttons which I have done so now I click "StartCO" button and it loads the exe up. I added a richtextbox also and finally hung my head in shame because what I was attempting just didn't work no matter what code I looked at on Google.
The GUI is nothing fancy or special just a single button to load the Conquer.exe which was simple enough and as stated I added a richtextbox but how on earth do I get it so that it writes data to the richtextbox???
Code:
private void richTextBox1_TextChanged(object sender, EventArgs e) { COClient client = new COClient(); client.Attached += (delegate() { Console.WriteLine("Client with process Id " + client.ProcessId + " attached"); Console.WriteLine(); }); }
I also find I can close the GUI and the client stays on but that's not such a big deal at the moment as this code seems to open the client regardless
Code:
private void button1_Click(object sender, EventArgs e) { COClient client = new COClient(); client.Start(); }