Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Leaders
Posted
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.
[sIGPIC]e[/sIGPIC]
Posted

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.

Posted

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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...