I have a window with a Tabbed Layout Pane containing 2 panels,The Dockmode of the tabbed layout pane is set to Fill.I need to put a Panel/Picturebox that indicates background processing at the center of the form and and on top of all the existing controls (or) on top of the first picturebox on the left pane
I have tried
Please help
To solve the positioning problem you can use either of the following options:
PictureBox
at run-timeRun-Time Solution
You can simply create PictureBox
at run-time and add it to Controls
collection of the Form
and when needed, simply bring it to from using BringToFront
method.
Design-Time Solution
You can use Document Outline window to change parent of the controls and their z-index. You can simply drag and drop tree nodes (controls) to change parent and z-index of the control.
Just for example, create a new Form
, drop a Panel
on form and set its Dock
to Fill
. Then drop a PictureBox
on panel. Then using Document Outline window, in tree view, drag the PictureBox
and bring it up the panel node in tree view. This way you are setting the Form as parent of the PictureBox
. To move the picture box to a suitable location on form, use arrow keys or use Properties window. Don't use mouse, if you use mouse to change the location, you will change the parent unintendedly.