Skip to content

MainWindowHandle and MainWindowTitle always 0/null #41

@Light407

Description

@Light407

First of all thanks for a great lib, really works great!

We modified this lib a bit in order to start an GUI application minimized from a Windows Service, we used the following line and it seems to work:

startInfo.wShowWindow = (short)SW.SW_SHOWMINIMIZED;

Before finding out we could modify it this way I was trying a wide range of methods in order to call ShowWindow with value 6 (Minimize) to minimize to main window upon start but I tried 3-4 different Windows invoke calls such as EnumWindows, FindWindow, MainWindowHandle prop etc but all methods I could find was returning 0 for MainWindowHandle trying to find the Window for the started application and minimize it. Really strange, when I found out I could do above I gave up on doing it with ShowWindow.

Has anyone encountered this issue and/or solved it? Interested in knowing why this is happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions