Question How to format order of PowerPack shapes at design time?

skessinger

Member
Joined
Apr 12, 2010
Messages
8
Programming Experience
10+
This used to work but now it is disabled. If I draw any shapes (Rectangular, Oval, or Line), I click on any particular shape, then when I click on menu Format, Order, both BringToFront and SendToBack are disabled?? I am using PowerPacks v. 10, with Visual Studio 2010 (VisualBasic.NET), on Windows 7 64-bit. I have closed and restarted my application, but it did not help. I started a brand new project, same thing. Please help ASAP, I must be able to set the order to draw certain graphics for my application. Thank you in advance.
 
Any else have this problem????

This is still a problem for me. I have migrated to Visual Studio 2012, .NET Framework 4, no difference. Anyone else have this problem?
 
Worked fine using VS 2008 on Windows XP 32-bit machine

It worked before so do not chime in about it being an issue with windowless controls.
 
The shapes themselves are not actually controls. They all exist inside on ShapeContainer, which is a control. I can't speak for what was or wasn't supported in earlier versions but I can confirm that, in VS 2012, it appears that you cannot select a shape a Bring To Front or Send To Back. From what I can see, you have two options:

1. Select a shape in the designer, Cut it to the Clipboard and then Paste it. This will have the effect of bringing it to the front, except that its Location will likely change and you'll have to set it back. This may also detach any event handlers, so check that afterwards too.

2. Open the designer code file (click Show All Files in the Solution Explorer and then expand the form node) and rearrange the shapes in the line that looks like this:
VB.NET:
Me.ShapeContainer1.Shapes.AddRange(New Microsoft.VisualBasic.PowerPacks.Shape() {[B][U]Me.OvalShape1, Me.RectangleShape1[/U][/B]})
Whatever is added first in that list will be at the front and whatever you add last will be at the back.
 
Thanks for quick response and suggestions

Thanks, jmcilhinney, for your quick response and suggestions. I will keep this mind in the future, unfortunately these methods will be tedious for me as I may have over 50 shapes to manage on a single form (this is for an industrial machine application depicting valves, pumps, tanks, and plumbing fluid lines), I have subsequently substituted labels for any line or rectangular shape. But forms I developed in the past with shapes I cannot re-use.
 
Back
Top