thanks for the reply. By main window i mean it becomes the topmost window not just of the application that is calling but of anything that may be running.
specifically, the applcation has a thread that every 15 minutes checks a location on the network fileserver and if certain files are there it does x, y, z. Include in the x, y, z is a call to another application and as soon as
createinstance is called boom it's the topmost window even if the user is in something like IE or word. as you may guess there's no way i can deploy the app with it working this way. As stated above it is being called in a separate thread from app however I'm far from a expert on threading so there may be something i've set wrong in the process.
so far the best i've come up with is importing the user32.dll and hiding the window with ShowWindow(). however there's still a flicker since i can't get the handle until the window is created.