Hmm, normally, I just cut all those controls out and delete the GroupBox. But, it's not easy all the time, so me just wondering if there was a way to do it without touching the child controls.
Remove the relationship? Or other otions?

Recommended Answers

All 12 Replies

I'm pretty sure the controls will be deleted with their parent. One option you have is to remove the controls from the parent control and place it in a different one or the form itself

For Each c As Control in GroupBox1.Controls

You may have to play with location, but everything else should be the same.

I understand your idea, tinstaafl, but then is there a way so we won't have to use code, some property or some... thing?

Not that I'm aware of.

If you are doing it at design time then just select all child controls, cut, then delete the container, then paste the previously cut controls back on the form.

@Jim: Yes, i'm doing it everyday and wanting another solution now.

Then I suggest you do it the way I said. What could be faster than cut & paste?

Well, if there're some hidden forms which being outside form border, what should I do to make sure they still there?

You will have to expand the border (probably both form and container) to see the hidden controls, then copy/paste them from the container onto the form.

@Hearth: Actually, if I want to see all the hidden objects, I can do it better with Document Outline. But Document Outline won't let you keep objects location so it's really annoying.

Well, if there're some hidden forms which being outside form border,

I presume you mean hidden controls rather than hidden forms. Your original question was about controls inside containers. Is this a different question?

You can use the dropdown on the properties window to select any controls or forms, even ones you can not see on the screen (simply scroll to the one you want,) upon being selected it will become active and you can cut and paste etc.

@Jim: Yes, it was about objects. Sorry.
@Waddell: I did mentioned the Doc Outline before, and it was better than the property scroll, though.
The thread has become quite long now, thks for great helps, guys :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.