I need to have box (or frame) but the center must be hollow. I do not want to use Shape as that control has no properties and it cannot be on top of other controls (Zorder 0).
Printable View
I need to have box (or frame) but the center must be hollow. I do not want to use Shape as that control has no properties and it cannot be on top of other controls (Zorder 0).
You could use a Frame and make the contents invisible. But that would be far too much source code, to do that. So then your best bet, would to make a User Control. Draw a Image and then make the background invisible. Also then give it some kind of Events, like Click(), DblClick() and MouseDown() for starters...
Does RhinoBulls contribution here help?
A little more complex than what I was looking for. I made a simple makeshift frame by using four pictureboxes. It looks exactly as if one had used a Shape with a Transparent FillStyle. I couldn't use the Shape as it cannot be the topmost control. The only problem with using the Pictureboxes is that as I move the Picturebox "frame" I have to move each Picturebox one at a time. It doesn't cause any problems graphically speaking that is. I suppose I could make a borderless transparent form with user draw borders and then embedd that onto the main Form.
-- Try making a UserControl with the BorderStyle = 1, instead of using a Control, as such. It looks very much like a PictureBox with the Border, as well...
It's also very much quicker loading the contents of the control, when you have a graphic. I found out. Rather than loading four or six controls, each time...