my form contains user contrors in a matrix spreading
like this:

Main_Board = new Virtual_Vertex[9,7];
            for (int i = 0; i < 9; i++)
                for (int j = 0; j < 7; j++)
                    Main_Board[i, j] = new Virtual_Vertex();
                    Main_Board[i, j].Location = new Point(8+(i*dist), 30+(j*dist));
                    Main_Board[i, j].VirtualVertexClicked += new VirtualVertexClickedHandler(CreateNewVertex);
                    this.Controls.Add(Main_Board[i, j]);

each user has a picturebox with default picture.
i want to draw a line between two users.
the problem is when i draw a line which passes threw another users picture, the users picture
hides the line.
is there any way to make the drawed line to be "always on top" of the other pictures in my form?

10 Years
Discussion Span
Last Post by emilio

The problem you are facing is due to the fact that windows first paints the Parent control and then child controls are painted over them so i guess this is the reason of you not being able to view the line.
I would recomend you to override the OnPaint event and do the painting stuff there.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.