473,769 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hiding topmost form when parent form deactivates

Max
Hello,

My VB.NET application displays a Windows form in a panel
on my main form. While my application has the focus, I
want the form in the panel to have the "topmost"
position, even if it is not the active form.

Everything works as expected, but if the user selects
another application by pressing a tab in the taskbar,
then my "topmost" form still occupies the "topmost"
position.

How can I detect when a user selects another program by
pressing a tab on the taskbar? I would like to be able
to detect this and change the "topmost" attribute of my
form.

Thank you for any help.

Best regards,

Max
Nov 20 '05 #1
2 3839
Take a look at the Form Deactivate event. It is fired when your form
is not the active window.

Good Luck,
Craig

"Max" <an*******@disc ussions.microso ft.com> wrote in message news:<02******* *************** ******@phx.gbl> ...
Hello,

My VB.NET application displays a Windows form in a panel
on my main form. While my application has the focus, I
want the form in the panel to have the "topmost"
position, even if it is not the active form.

Everything works as expected, but if the user selects
another application by pressing a tab in the taskbar,
then my "topmost" form still occupies the "topmost"
position.

How can I detect when a user selects another program by
pressing a tab on the taskbar? I would like to be able
to detect this and change the "topmost" attribute of my
form.

Thank you for any help.

Best regards,

Max

Nov 20 '05 #2
Test. Ignore.
"Max" <an*******@disc ussions.microso ft.com> wrote in message news:<02******* *************** ******@phx.gbl> ...
Hello,

My VB.NET application displays a Windows form in a panel
on my main form. While my application has the focus, I
want the form in the panel to have the "topmost"
position, even if it is not the active form.

Everything works as expected, but if the user selects
another application by pressing a tab in the taskbar,
then my "topmost" form still occupies the "topmost"
position.

How can I detect when a user selects another program by
pressing a tab on the taskbar? I would like to be able
to detect this and change the "topmost" attribute of my
form.

Thank you for any help.

Best regards,

Max

Nov 20 '05 #3

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

Similar topics

7
5282
by: Caroline Bradford | last post by:
Hi there, I wonder if there is a kind and knowledgeable person out there who can help me with a sticky problem. I have a form with a subform which shows detailed data. For complicated reasons, which I won't go into, the detail which I require cannot be determined programmatically, so I planned to have two subforms, identical in design but with slightly different data, dependent on a criterion in the main form. Both will sit on the...
3
7862
by: Hovhannes Asatryan | last post by:
Hello guys. I have a problem with a topmost form. I am writting in C#. I have Mdi Form wich has 2 child forms. I want to set one of them as a topmost window, but when I sets MdiParent the TopMost property does not working. How can I set the one form as a topmost? Can anyone send me code example?
4
1699
by: hazz | last post by:
What are the basic mechanisms behind an auto-hiding window which moves out of the way when not needed and flys back out when clicked on. Is this real complicated stuff? Thanks, -hazz
5
3138
by: Lance | last post by:
How do I make a form always stay over a parent form, but NOT have the form appear over forms outside of the application. For example, the Find window in VS.NET acts how I want. Thanks, Lance
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
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
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...
4
4828
by: Mandragon03 | last post by:
I have an MDI form that has 4 child forms that are locked on top of any other child form in the MDI. I want to unlock these 4 forms so they are not always on top of all the other forms in the MDI. When I set ChildForm1.TopMost = false; It does nothing. Is there another another property I should be looking at? Thanks!
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
9420
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9984
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.