hello there, this forum seems somewhat deserted, but im trying out anyways
Code:
string convStr = listBox1.SelectedItem.ToString();
IntPtr hWnd = (IntPtr)Convert.ToInt32(convStr);
label1.Text = GetProcessID(hWnd).ToString();
is my problem, as far as i found out i need the intptr convertion for changing the input from the listbox into the handle hWnd, and afterwards print it to the lable, but i somehow cant figure out how to do it, i get an error about the input string being a wrong format, i know i could use the FindWindow using pinvoke, but the point is only knowing the process handle not the process id nor window handle, hope to see some response =)