Is is the combat arms hook I use so that way when the process is out of view the AFK Bot or what not can still do its job.
Code:
{
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(
string lpClassName,
string lpWindowName);
IntPtr hWnd = FindWindow(
null,
"*name*");
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = true)]
static extern bool PostMessage(
IntPtr hWnd,
uint Msg,
int wParam,
int lParam);
const int WM_KEYDOWN = 0x100;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
FindWindow(null, "*name*");
}
This needs some editing any c# noob can do it, i just dont want this to be a copy and paste thing.