Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Re: My .NET form goes behind others after COM goes away

 

I have a .NET form written in C# (VS2005 SP1) that instantiates a COM object. That COM object brings up a VB6 form. When I close the VB6 form, my .NET form disappears behind any other forms that happen to be open such as Windows Explorer windows for example. I have to click its icon on the taskbar in order for in to come back to the front.

 

EDIT: It appears that its not that the form is going behind, but that the window where the task was launched is brought forward, and given focus. If I run from the debugger, VS2005 gets the focus, and if I run the EXE from a Windows Explorer, then WE gets the focus.

 

I have already tried this.BringToFront();

 

Is there a way to keep my .NET form in the foreground?

 

Thanks!

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...