FindwindowEx googlechrome WinAPI C#

1.5k views Asked by At

I trying to look for the file opened in Google Chrome that found in the Taskbar in the function FindWindowEx. And that's what I made,help me to fixed the mistakes cause I dont understand how to do it.

    bool show = true;
    const int SW_HIDE = 0;
    const int SW_SHOW = 5;

    taskbarWnd = FindWindow("Shell_TrayWnd", null);
    chromeWnd = FindWindowEx(taskbarWnd, IntPtr.Zero, "Google Chrome", null);

    ShowWindow(chromeWnd, show ? SW_HIDE : SW_SHOW);
    show = !show

thanks for helping :)

1

There are 1 answers

0
user2421312 On

It used to work with:

FindWindowEx(hChrome, IntPtr.Zero, "Chrome_OmniboxView", IntPtr.Zero);

But I don't know if it's working anymore.