I need to minimize the AmiBroker application from an external program. When there are multiple instances running, I need to minimize the first instance – the same instance that is available to OLE automation. Any clever ideas how to do this? I can use the Win32 API in my code, but I don’t know how to get the first window handle when there are multiple instances running.
If you can use Win32API you can query Windows task bar and find out first icon - it is first running instance. Or you can query Process list. First broker.exe on the process list would be the one you are looking for.
Got it working, thank you @Tomasz