barski Posted April 12, 2007 Posted April 12, 2007 i use activator to startup a third party exe let's call it widget. i invoke a few methods and pass args to widget the close widget... all works well except how can i keep widget running in the background instead of becoming the "main' window everytime a method is invoked? Quote
Leaders snarfblam Posted April 13, 2007 Leaders Posted April 13, 2007 So, the application opens its own window? When you say "main" window, do you mean that it becomes a parent window, recieves focus, appears on the task bar, becomes topmost ("stay on top")...? I think you need to elaborate a little on what is going on here. The solution probably lies in the realm of threading, app domains, or method of invocation, rather than method of instantiation. Quote [sIGPIC]e[/sIGPIC]
barski Posted April 14, 2007 Author Posted April 14, 2007 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. Quote
barski Posted April 15, 2007 Author Posted April 15, 2007 I think i've figured it out. It will be a couple of days before i actually try it but i think if i use ShellExecute to open the window with a hide arg instead of CreateInstance i will be able to remove the flicker... if anyone has a better idea please suggest it! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.