Cannot launch an application in WS_MAXIMIZE using ShellExecute from Delphi Rio in Windows 10

Wisnu Widiarta :

I tried to run an App using ShellExecute. It ran, but not shown (I can see the instance in TaskManager).

    ShellExecute(0, PChar('open'), PChar(ExtractFileName(edExePath.Text)),
    PChar(theParameter), PChar(theFolder), WS_MAXIMIZE);

What should I do so the app will be launched in max windows size?

Andreas Rejbrand :

You are using WS_MAXIMIZE. That constant is a window style.

You should be using SW_MAXIMIZE. That's a flag for the ShowWindow function.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=391395&siteId=1