.BringtoFront doesn't

  • Thread starter Thread starter Eric Goforth
  • Start date Start date
E

Eric Goforth

Hello,

I have an MDI VB.NET app that is called from a VB6 app,
and it basically lives on top of the VB App. When the
user clicks on controls on the VB6 app I do an

MDIParentForm.WindowState = FormWindowState.Minimized

After the user has clicked on a particular menu item then
I want to bring my VB.NET MDI app back on top. I've tried
doing a:

MDIParentForm.WindowState = FormWindowState.Maximized

and I've tried doing a:

MDIParentForm.BringtoFront
MDIParentForm.WindowState = FormWindowState.Maximized

But my MDI application still stays put and I have to click
on the icon in the system task bar to bring it back up.

I don't want to make this modal or anything. I just want
to pop it on top of the VB6 app. Any idea how to do
this? I guess that maybe I could use some API calls to do
sort of the equivalent to an Alt+Tab, but that seems
cumbersome.

-Eric
 
* (e-mail address removed) (Eric Goforth) scripsit:
I have an MDI VB.NET app that is called from a VB6 app,
and it basically lives on top of the VB App. When the
user clicks on controls on the VB6 app I do an

MDIParentForm.WindowState = FormWindowState.Minimized

After the user has clicked on a particular menu item then
I want to bring my VB.NET MDI app back on top. I've tried
doing a:

You will have to use 'AppActivate' or pinvoke on 'AttachThreadInput':

<http://www.mvps.org/vb/samples.htm>
-> "ForceFore.zip"
 
Hello,

I couldn't get the samples link to work.

I know about 'AppActivate.' How does the pinvoke on 'AttachThreadInput'
work? It would be VERY preferable to do this on the VB.NET side of
things. I do have access to the VB6 calling application, but it is very
limited.

-Eric
 
Back
Top