Solved

BringToFront method

Posted on 2006-07-09
4
721 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 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