Skip to content

Need help on showing and hiding process

Rejinderi Kun

Asked Aug 21, 2006, 6:06 PM EDT1 answer
Share
LinkedInX
ok.. about hiding and showing window.. using simple coding it is able to hide simple windows like notepads.. firefox.. eg.. but i wanna hide a game window called Conquer.. it always crashes CODE private const int hiding = 0; private const int restoring = 9; private int numbers; [DllImport("User32")] private static extern int ShowWindow(int hwnd, int nCmdShow); private void hide_Click(object sender, EventArgs e) { Process[] p = Process.GetProcessesByName("Conquer"); numbers = (int)p[0].MainWindowHandle; ShowWindow(numbers, hiding); } private void restore_Click(object sender, EventArgs e) { Process[] p = Process.GetProcessesByName("Conquer"); numbers = (int)p[0].MainWindowHandle; ShowWindow(numbers, restoring); } anyone know why? i took a vid of it.. can view it here.. http://www.youtube.com/watch?v=EAcT_oOoQ1Y when it finsh loading the load game thing showed for a 2nd time when i press hide.. its not suppose to be that way most prob is a direct x error..

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    my friend told me to use the setwindowpos( method but it onli hides the screen.. strangely.. the title bar is still there.. and how do i hide the task bar icon(not sure how to say) of tat application?
    0