Ok it seems everybody is fascinated with using console which is great BUT I prefer GUI, basically my issue is a simple one for those that know and I've spent hours looking on Google trying to figure this out and I'm still non the wiser :(
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???
That's all I'm trying to add for now and any help with this little part will no doubt help me to understand how to add future things. Console.Writeline doesn't seem to add to the richtextbox?
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
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();
}