Keeping a VB.Net Window in foreground

F

fdmaxey

I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.

Frank Maxey
 
J

Jeff Johnson [MVP: VB]

I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.

No, not really. SStory's suggestion will keep the app on top of ALL windows,
not just the 2nd application, so I don't think it's what you want. I think
your best bet would be to use the SetParent() API function to make your .NET
app an "owned window" of the 2nd app.
 
F

fdmaxey

Thanks! I new it was something embarrassingly simple. I just didn't
know where to look.

Frank Maxey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top