473,769 Members | 3,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Me.TopMost = True

I'm running VS.NET 2002 and keep having problems with form keeping on top
with its TopMost property. Sometimes my program places the invoked form on
top sometimes not. Sometimes when I click on the form it stays on top as it
should, but sometimes TopMost property does not pick up so if I click to
some other program it covers the form which supposed to remain on the top.
Has anyone experienced similar problems? is there a fix? or I am
misinterpreting the property? Any input would be greatly helpful. Thanks,

--
Strah @ Langan
Nov 20 '05 #1
6 4752
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as the
top-most form of your application."

The key part is "of your application". TopMost should make this the top form in
your application, but does not force it on top of all, or other applications.

I believe making a system wide top level form is more difficult. I haven't done
it in dotNet, but in the past it required Win32API calls to set the overall Z
order.

Gerald
"Strahimir Antoljak" <st***@netzero. net> wrote in message
news:Of******** ********@TK2MSF TNGP10.phx.gbl. ..
I'm running VS.NET 2002 and keep having problems with form keeping on top
with its TopMost property. Sometimes my program places the invoked form on
top sometimes not. Sometimes when I click on the form it stays on top as it
should, but sometimes TopMost property does not pick up so if I click to
some other program it covers the form which supposed to remain on the top.
Has anyone experienced similar problems? is there a fix? or I am
misinterpreting the property? Any input would be greatly helpful. Thanks,

--
Strah @ Langan

Nov 20 '05 #2
Gerald,

thanks for your reply. That would definitely explained the part I
misunderstood. But if this is true, then now I do not understand why in
certain cases the form remains on the top of anything else (any other
application). In other words, it does set the overall Z order. (Up until
this moment I thought that TopMost property does replaces the Win32API
function for overall Z. Now, I am not sure any longer.) Just out of
curiosity, have you tried to use this property? Maybe created the most
simple app with a form and then apply that property, and see what happens
with the form - does it gain overall Z order on just app level Z order?

Thanks again for your reply,

--
Strah @ Langan

"Cablewizar d" <Ca*********@Ya hoo.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as the top-most form of your application."

The key part is "of your application". TopMost should make this the top form in your application, but does not force it on top of all, or other applications.
I believe making a system wide top level form is more difficult. I haven't done it in dotNet, but in the past it required Win32API calls to set the overall Z order.

Gerald
"Strahimir Antoljak" <st***@netzero. net> wrote in message
news:Of******** ********@TK2MSF TNGP10.phx.gbl. ..
I'm running VS.NET 2002 and keep having problems with form keeping on top with its TopMost property. Sometimes my program places the invoked form on top sometimes not. Sometimes when I click on the form it stays on top as it should, but sometimes TopMost property does not pick up so if I click to
some other program it covers the form which supposed to remain on the top. Has anyone experienced similar problems? is there a fix? or I am
misinterpreting the property? Any input would be greatly helpful. Thanks,
--
Strah @ Langan


Nov 20 '05 #3

"Cablewizar d" <Ca*********@Ya hoo.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as the top-most form of your application."

The key part is "of your application". TopMost should make this the top form in your application, but does not force it on top of all, or other applications.
I believe making a system wide top level form is more difficult. I haven't done it in dotNet, but in the past it required Win32API calls to set the overall Z order.


That may have been the case in the 1.0 version of the framework, but while
answering a question yesterday I tested TopMost under 1.1 and it most
definitely is a true topmost window as far as Windows terminology is
concerned, i.e., it stays on top of ALL windows in the system (except other
topmost windows, of course).
Nov 20 '05 #4
I have not had the need for a system wide top level form in dotNet yet.
For sub forms that need to be on top of the main form, I just make it owned by
the main form and this works perfectly.

However, I did just give this a try. Interestingly, it DOES seem to try to be
the top system form. So I must admit that now I am a little confused as this
seems contradictory in the docs. I suppose it is entirely possible that if
another app tries to make itself TopMost after your app is launched, then it
would proly move yours down the Z order and would no longer be Top. In my quick
test, I did not have any other apps appear on top of it. So I guess I'm stumped
as to what is going on.

Gerald
"Strahimir Antoljak" <st***@netzero. net> wrote in message
news:ew******** ******@TK2MSFTN GP11.phx.gbl...
Gerald,

thanks for your reply. That would definitely explained the part I
misunderstood. But if this is true, then now I do not understand why in
certain cases the form remains on the top of anything else (any other
application). In other words, it does set the overall Z order. (Up until
this moment I thought that TopMost property does replaces the Win32API
function for overall Z. Now, I am not sure any longer.) Just out of
curiosity, have you tried to use this property? Maybe created the most
simple app with a form and then apply that property, and see what happens
with the form - does it gain overall Z order on just app level Z order?

Thanks again for your reply,

--
Strah @ Langan

"Cablewizar d" <Ca*********@Ya hoo.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as

the
top-most form of your application."

The key part is "of your application". TopMost should make this the top

form in
your application, but does not force it on top of all, or other

applications.

I believe making a system wide top level form is more difficult. I haven't

done
it in dotNet, but in the past it required Win32API calls to set the

overall Z
order.

Gerald
"Strahimir Antoljak" <st***@netzero. net> wrote in message
news:Of******** ********@TK2MSF TNGP10.phx.gbl. ..
I'm running VS.NET 2002 and keep having problems with form keeping on top with its TopMost property. Sometimes my program places the invoked form on top sometimes not. Sometimes when I click on the form it stays on top as it should, but sometimes TopMost property does not pick up so if I click to
some other program it covers the form which supposed to remain on the top. Has anyone experienced similar problems? is there a fix? or I am
misinterpreting the property? Any input would be greatly helpful. Thanks,
--
Strah @ Langan



Nov 20 '05 #5
Thanks Jeff,

I haven't played with that at all since 1.0, but just tried it (1.1) and ended
up quite confused, as it definately acts differently than I expected. Learned
something new today already, wahoo!

Gerald

"Jeff Johnson [MVP: VB]" <i.***@enough.s pam> wrote in message
news:OV******** *****@TK2MSFTNG P09.phx.gbl...

"Cablewizar d" <Ca*********@Ya hoo.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as

the
top-most form of your application."

The key part is "of your application". TopMost should make this the top

form in
your application, but does not force it on top of all, or other

applications.

I believe making a system wide top level form is more difficult. I haven't

done
it in dotNet, but in the past it required Win32API calls to set the

overall Z
order.


That may have been the case in the 1.0 version of the framework, but while
answering a question yesterday I tested TopMost under 1.1 and it most
definitely is a true topmost window as far as Windows terminology is
concerned, i.e., it stays on top of ALL windows in the system (except other
topmost windows, of course).

Nov 20 '05 #6
thanks Jeff for the input
--
Strah @ Langan

"Jeff Johnson [MVP: VB]" <i.***@enough.s pam> wrote in message
news:OV******** *****@TK2MSFTNG P09.phx.gbl...

"Cablewizar d" <Ca*********@Ya hoo.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl...
There may be one key point you are missing.
According to the docs, Form.TopMost =
"Gets or sets a value indicating whether the form should be displayed as the
top-most form of your application."

The key part is "of your application". TopMost should make this the top

form in
your application, but does not force it on top of all, or other

applications.

I believe making a system wide top level form is more difficult. I

haven't done
it in dotNet, but in the past it required Win32API calls to set the overall Z
order.


That may have been the case in the 1.0 version of the framework, but while
answering a question yesterday I tested TopMost under 1.1 and it most
definitely is a true topmost window as far as Windows terminology is
concerned, i.e., it stays on top of ALL windows in the system (except

other topmost windows, of course).

Nov 20 '05 #7

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

Similar topics

0
1422
by: Sajjadul Hakim | last post by:
Hello Everyone, When i add a DataGrid to a form, the TopMost property of the form becomes invalid; i.e. even if the TopMost property is set to "true" the form does not stay on top of other forms. This is very weird. You can try it out. I tried a way around. If I reset the form's TopMost property in the DataGrid's "Paint" event, it works. Can anyone please give me an alternative solution. Thanks.
2
6852
by: JaguarX | last post by:
I have an application that needs a window to stay on top of the other ones, I thought that TopMost = true would be suitable for this feature but it also makes this window to stay on top of all other application running on my PC, Does anybody know How can I prevent this TopMost window appear when I switch to the other applications?? _______________________ JaguarX
2
4564
by: Claire | last post by:
I need my communication status window to be topmost when it's open/active. Ive set the TopMost property of the form to true and it does work ok. After performing tasks this window generates an error or confirmation messagebox. If this window is the Active/Selected window then the messagebox appears in front of it ok. If I click on another application before the messageboxes are generated, then they appear and are hidden behind the topmost...
12
7538
by: E Goforth | last post by:
Hello, I have a VB6 app that calls a VB.NET app via named pipes and a third party component. Inside the VB.NET app I'm trying to force a form to the top, at least temporarily. Inside a form's public sub I'm doing: Public Sub ThisIsMySub(TheseAreMyArguments) Me.Show Me.WindowState = FormWindowState.Normal Me.TopMost = True
1
6096
by: Kevin | last post by:
Hello, I've seen a couple previous posts about this phenomenon, but none seem to have been resolved. I am using Visual Basic .NET 2003 on Windows 2000 SP 3. Would you mind creating a new project and running this simple test program to see if it happens to you? Please let me know if you have any ideas for a workaround (other than setting the TopMost form to False then back to True every time I show a MessageBox.)
1
2029
by: SamSpade | last post by:
I learned about the TopMost property from a recent post which solved some problems. But I have a situation where a control wants to make the form it is on be the topmost. It could raise an event but be cleaner if it could do it directly. I tried the following but the compiler thinks Parent is a control (they don't have a topmost property.)
6
1942
by: Jonathan | last post by:
Hi, I have a parent(container) form which opens another form, and that one opens another etc.., each form is open with Form.MdiParent = Me.MdiParent. (apart from the first one which is just "= Me") However, there is one form which is smaller than others, and i have set it to Topmost = TRUE. but the problem is when i click those forms at the background, the smaller
1
2593
by: Phil Galey | last post by:
I have a small application, which is to always stay on top. Another application, which it is supposed to stay on top of, is QuarkXPress 5. I'm using Me.TopMost = True in the Form1_Deactivate event, and it works almost perfectly. It always stays on top, except when I click on one of the tools in the floating tool bar of QuarkXPress. Anything else in QuarkXPress is no problem ... document, menus, etc. But click on anything on...
0
1060
by: Jack Russell | last post by:
I have a problem that on one Vista system when my program starts it does not come to the front. Bringtofront did not fix it so I tried setting topmost to true then using a timer setting topmost to false. That works but then and controls in msgboxs or forms that form loads are "locked". Strangely the close button (X) on those forms does work. If I set the topmost to false using a control everything works as expected. Why cant I set...
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.