I've done some searching on Google and no luck, so I thought I'd check here. I have a relatively simple windows forms program I wrote in C#. In the program I scan the network, get a list of computer names, then when the user chooses computers and clicks a button, I run a WMI query on each of the selected computers. However, the problem is that if I open another program that is overtop of my WMI program's window, when I try to click on it or click on the taskbar thing for it, it won't come to the front. It will stay behind the other windows...
I'm not doing the WMI processing in a different thread (a mistake, I know, which will be rectified in a future version), which may be part of the problem, since this is the only time the window problem is happening. However, if I right click on the name of the program in the taskbar, it will come to the front... just not if I do left-click or actually click on a visible portion of the window.
Does anyone know how I can fix this? I haven't messed with any of the display properties, so everything should be set to the default that VS2008 sets it. Or do you think it's just that the window is partially unresponsive because of the intense calculation going on with the queries?
[EDIT: Just noticed something else. If the active window (not my program) is not maximized, I get this issue... if it IS maximized, I can left-click on my program in the taskbar to bring it up as the active window... thought maybe this might help someone narrow it down for me. Thanks!]
This post has been edited by beju0506: 23 March 2010 - 12:14 PM