473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

force a form to the front

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
Nov 20 '05 #1
4 1891
* "Fei" <fw***@csystemssoftware.com> scripsit:
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>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

"Fei" <fw***@csystemssoftware.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
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 ? :)
Nov 20 '05 #3
Ken
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.
-----Original Message-----
Hi,

I got a simple question. I have my application running in Windows XPOS. 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 tothe topmost on my desktop with a maximized size ?

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

Nov 20 '05 #4
Fei
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

"Ken" <an*******@discussions.microsoft.com> wrote in message
news:c6****************************@phx.gbl...
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.
-----Original Message-----
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
.

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: zhou | last post by:
Hi there, We have a compiler specific issue which requires us to force template instantiation. This works fine. The problem comes when I try using std:find() on vector. Since vector has no member...
2
by: Charles Eubanks | last post by:
The enclosed html snippet displays an area map. The behavior I want is for each area to show up (eg show the outline of the poly) when the user mouses over it. This happens nicely BUT in order...
2
by: jeef | last post by:
Im looking for a Form Program that allows someone to easily create a form (ex: word or frontpage) then publish it to the web. Then once someone hits the website they can fill out the form and the...
3
by: Richard L Rosenheim | last post by:
I have the application's form (MainForm) along with a 2nd form (Form2). If the user minimizes MainForm, I also minimize Form2. And when the user restores the application, I also restore Form2. ...
0
by: feng | last post by:
Hi, I am having a strange problem right now and I don't even know how to go about it. Someone please help me! Any inputs will be highly appreciated. We have an application that has a VB.Net...
21
by: tradmusic.com | last post by:
Hi, We have the following in our stylesheet, which acts as a page header: #homepageheader { left: 0px; top: 0px; right: 0px; height: 183px; background-image:...
3
by: M O J O | last post by:
Hi, I have an application where I've implemented a global hotkey, so no matter what other application is in front (have focus), my app will react when the key combination is pressed. This works...
3
by: John | last post by:
What is the easiest way to make the contact form show on the front page. Meaning on want to keep the front html page and when someone clicks on the contact us link the front page remains the same,...
17
by: M O J O | last post by:
Hi, How can I force a form to the foreground no matter what application is in front? Thanks! M O J O
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.