Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

BringToFront method

Posted on 2006-07-09
4
Medium Priority
?
730 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 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