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?

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.

ok

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.