force a form to the front

  • Thread starter Thread starter Fei
  • Start date Start date
F

Fei

Hi,

I got a simple question. I have my application running in Windows XP
OS. Sometimes, there may be multiple apps running together at the same time.
How can I force my app to the front, i.e. topmost? How can I force a form to
the topmost on my desktop with a maximized size ?

I am looking for any suggestions. Thanks a lot in advance !

Fei
 
* "Fei said:
I got a simple question. I have my application running in Windows XP
OS. Sometimes, there may be multiple apps running together at the same time.
How can I force my app to the front, i.e. topmost? How can I force a form to
the topmost on my desktop with a maximized size ?

That's not as easy and will require some p/invoke. A VB6 sample can be
found here:

<http://mvps.org/vb/code/ForceFore.zip>
 
Fei said:
Hi,

I got a simple question. I have my application running in Windows XP
OS. Sometimes, there may be multiple apps running together at the same time.
How can I force my app to the front, i.e. topmost? How can I force a form to
the topmost on my desktop with a maximized size ?

I am looking for any suggestions. Thanks a lot in advance !

Fei

Forms have a TopMost property, why not just set that ? :)
 
I have to say, don't you just love Dotnet?

To make your application stay on top, there is a property
of the form called TopMost. Set that to true, and you're
off and running.
 
No. I try that. I doesn't bring the form to the front. It just activates the
form. IN windows xp os, you can see a icon flashing in the taskbar.

Like Herfried point out, I may have to use Windows API. But for me, I don't
like to use API. I prefer to using function from DotNet framework. I am
still looking for an easier way to handle this. If I have no chioce. Windows
API will be considered.

Fei
 
Back
Top