views:

64

answers:

0

I am writing a desktop application that requires only one instance running, means if there is already running application instance, when another application instance runs, it check and shows actives the running application and exit itself quietly. I can get the running window's hwnd handle, but when I use ShowWindow API to show that window, a black window came out, I already tried use all kinds of parameters.

    [DllImport("User32.dll")]
    static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

Notes: The running application is minimized to notification bar, which is in hidden state.

It's a great thanks anybody please gtive me some suggestions.