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

Home Posts Topics Members FAQ

TopMost = true Problem

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
Nov 16 '05 #1
2 6851
Jaguar,

Thats expected behaviour. Topmost forms are always displayed at the highest
point in the Z-order of the windows on the desktop.

If you want to set form toplevel for only the first time, use
SetForegroundWi ndow function. This will bring ur window during start.

To solve your problem, during Deactivate event of your application, set the
topmost property of the form to false. Then again during Activated event set
it to true.

Shak.
"JaguarX" <Ja*****@discus sions.microsoft .com> wrote in message
news:C6******** *************** ***********@mic rosoft.com...
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

Nov 16 '05 #2
"JaguarX" <Ja*****@discus sions.microsoft .com> wrote in message news:<C6******* *************** ************@mi crosoft.com>...

Hi,

Try using the Owned property of the form.

a) From your main form, call AddOwnedForm, OR
b) from the second form, set its Owner property.

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

Nov 16 '05 #3

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

Similar topics

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
7537
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
3
1313
by: Jason Garland \(Secure Access Pty Ltd\) | last post by:
Does anyone know a way of making an item the highest form ? (eg nothing can go above it, stays on top ?) I have used the TopMost = True But if users hit the Start Button, it then goes over the top. Anyway of keeping it higher or another way around the problem ?
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
4752
by: Strahimir Antoljak | last post by:
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...
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
3
2904
by: Don | last post by:
I've got a form which (in a roundabout manner) calls a second form into existence which has its TopMost property set (the first form is not the parent of this second form because of the roundabout manner in which the second form is created and displayed). The user can then still work on the first form while the second form floats around above it. If the first form displays a messagebox via the MsgBox method, the messagebox appears...
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
10205
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...
1
7401
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...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
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.