0

I'm looking for a control, like a label, that will have comparable properties to the RectangleShape Component in Visual Studio. And I suppose I should also pose the question: are Visual Basic PowerPacks like the RectangleShape really relevant anymore?

I know it may seem silly, and will not affect the application at runtime, and I may seem like a pampered whiner, but I find the the shape components to be a real nuisance in the layout process. I feel like I'm using an out-dated control. And I particularly find the inability to multi-select regular controls and shape components at the same time most annoying.

Specifically here is what I'm tying to accomplish:

I have been tasked with rewriting an old VB6 program in VB.NET and am constrained to keep the visuals the same as what people are used to.

enter image description here

In the form above, I need a DiagonalCross pattern behind some text, and I have not found anything that will accomplish the same thing as the RectangleShape component. The FillStyle property only seems to be available in shape components.

For the moment I have resorted to putting all the Shapes and Controls in a Panel, so I can at least move them at the same time, but it is still a little weird to try to adjust the layout within the panel.

I'm hoping there is some way to have the same visual effect in something like a label. And I suppose I should clarify, I'm looking to find a definitive replacement for the Rectangle Shape component.

I know it may be a silly inquiry, and that the solution may be more difficult than the issue, but I thought I would ask and make sure I'm not missing something easier to replace shapes in the layout process.

I'll greatly appreciate any input. Thanks!

Hawkeye
  • 578
  • 8
  • 20
  • Many Many controls like the Panel support a background image which could be the crosshatch thing and it is a container control so it naturally will hold other things. – Ňɏssa Pøngjǣrdenlarp Dec 09 '15 at 01:27
  • 1
    It would first help if you understand what you were using. PowerPack shapes are not controls. There is one `ShapeContainer` control and all shapes are drawn onto that one control. That's why you can't select multiple controls and multiple shapes. – jmcilhinney Dec 09 '15 at 03:41
  • @jmcilhinney That's interesting. I wondered about the terminology, and I'll have to look into the ShapeContainer control. Thanks! – Hawkeye Dec 09 '15 at 04:17
  • @jmcilhinney Okay, I looked into the ShapeContainer and I see now what you mean, that a shape container is automatically drawn when you place a shape. But an interesting thing is that MSDN describes it as a control. Here's a [link](https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.powerpacks.shapecontainer%28v=vs.100%29.aspx). I just thought I'd share my findings. – Hawkeye Dec 09 '15 at 16:44
  • *MSDN describes the RectangleShape and other shapes as controls. – Hawkeye Dec 09 '15 at 20:33
  • 1
    That's poor writing from whoever wrote that documentation then. If you check that link you posted, you'll see that the `Control` class is in the inheritance hierarchy for the `ShapeContainer` class but, if you follow the link for the `RectangleShape` class, you'll see that it does not inherit `Control`. It does inherit `Component`, which is what allows it to be added to the Toolbox, so it is a component but not a control. – jmcilhinney Dec 09 '15 at 22:44
  • @jmcilhinney Ah, I see. Okay, I appreciate the clarification. It's too bad we can't always rely on the MSDN's use of terminology. I'll edit the title and post to to the proper terminology. Thanks! – Hawkeye Dec 09 '15 at 23:13

0 Answers0