Shape order in picturebox
Hi all,
I have a picture box where I want to draw lines, but then hide segments of the picturebox (hiding the drawn lines).
Then I want to be able to draw on top of the covered areas.
If a shape is drawn to a picture box in the IDE then it is always behind any lines drawn at run time.
if I load a shape at runtime it is always infront of all drawn lines despite drawing lines after loading and locating the shape.
Any suggestions?
Re: Shape order in picturebox
If you are using Line and Shape control then you may arrange them by using ZOrder:
Code:
Shape1.ZOrder '<<< this will put shape control in front of all other windowless controls such line, label, etc
'or
Line1.ZOrder
Re: Shape order in picturebox
I see. Thanks RinoBull.
So I can't really use shape and line controls in conjunction with a line method.
Picture1.Line (x1,y1)-(x2,y1)
if I want to layer a drawing.
.Line (x1,y1)-(x2,y1) will always be drawn to the picturebox under any controls.