private void hideButton_Click(object sender, EventArgs e) { int hWnd = curMiner.proc.MainWindowHandle.ToInt32(); ShowWindow(hWnd, SW_HIDE); }