Solved

BringToFront method

Posted on 2006-07-09
4
720 Views
Last Modified: 2012-05-05
When a control's BringToFront method is called, "the control is moved to the front of the z-order. If the control is a child of another control, the child control is moved to the front of the z-order. BringToFront does not make a control a top-level control, and it does not raise the Paint event." (msdn)

How can a control be made a top-level control? (C#)

0
Comment
Question by:campinas
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17067332
Top-level control definition:
The top-level control is defined as the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in. For example, if the control is contained on an MDI child Form, then the top-level control is the Multiple Document Interface (MDI) parent Form.

Obviously, it is impossible to make any child control top-level. BrintToFront is enough. Maybe you need to invlalidate parent form to redraw controls in new Z-order.
0
 

Author Comment

by:campinas
ID: 17067410
I have an expandable pane as a child of another control. Initialy the pane is not expanded (only the title bar is visible). When expanded, it is longer than available space in parent control. It cannot expand beyond the limits of the parent control. It actually does expand fully, but the only visible part is what's inside parent control. It looks like what i wanted is not possible... Or is it?
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 17067417
In this case you need to resize parent control or make scrolling. Top-level is not right way.
0
 

Author Comment

by:campinas
ID: 17067476
Thank you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
creating a flowchart from an algorithm 5 30
Data Saving 5 56
Iterate a dictionnary to change values 4 53
C# MVC and a global static factory that never dies 4 48
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now