There are a few of ways you could do this. First of all is the application you are trying to set the window to the topmost an application that you wrote. If it is you can locate the window using the Windows API FindWindow passing in the Classname (TMyForm) getting back the windows handle. Then pass that windows handle to one of many Windows API functions to bring it to the top (i.e. BringWindowToTop, SetForgroundWindow, ShowWindow, SetWindowPos etc.). You will have to read about these functions to see which one will best suite your needs.
Secondly, if you do not have the window handle then you could find the window using the FindWindow and passing in the window title. I only recommend this one if the window title is static and even then I don't like that...but it can work.
Thirdly, if neither of these are an option you will have to enumerate the windows getting back the window that you wish and then enumerating that window handles child windows. Once again you have to know what you are looking for to get to the correct window.
I believe that the last way would be to somehow enumerate the processes and then take that process and get the active window and then get the child window...but I am not sure and would have to research this more.
The online help on MS WIN32 SDK in Delphi is very good and can lead you in the correct direction.
Good Luck,
Brett Parkhurst
Brett Parkhurst
brettparkhurst@uswest.net