473,406 Members | 2,705 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,406 software developers and data experts.

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 6809
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
SetForegroundWindow 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*****@discussions.microsoft.com> wrote in message
news:C6**********************************@microsof t.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*****@discussions.microsoft.com> wrote in message news:<C6**********************************@microso ft.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
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...
12
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...
3
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...
1
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...
6
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...
6
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 "=...
3
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.