Benoit,
In addition to the Fergus's & Herfried's comments about doing the drawing
yourself with the Graphics object (in the Paint event OnPaint override).
The microsoft.public.dotnet.framework.drawing newsgroups provides assistance
dedicated to Graphics & drawing.
Charles Petzold's book "Programming Microsoft Windows with Microsoft Visual
Basic .NET" from MS press provides a wealth of information on using the
Graphics object in .NET.
The following articles discusses how to create a .NET Line control that
wraps Win32 STATIC controls. useful for lines in dialog boxes (not grids per
se).
http://www.codeproject.com/cs/miscctrl/hvrules1.asp
Hope this helps
Jay
"Benoit Martin" <(E-Mail Removed)> wrote in message
news:uHq%(E-Mail Removed)...
> I had to draw my own control because I couldn't find any control doing
what
> I wanted it to do. This control has a grid that I need to have control
over.
> To do that, I draw each line of the grid using a 1pixel pictureBox. I also
> need "boxes" to be placed within that grid depending on data pulled from
my
> dataset. I also used pictureBox controls for that. All those components
that
> I use to draw my control are added to the controls collection of the
parent
> control. The problem is that when I do a myControl.controls.clear() to
clear
> the control before I redraw it, I can see each line and each box being
> deleted one by one and that happens pretty slowly. I didn't have a chance
to
> test on other computers but the computer I'm using is decent (1Ghz with
> 512Mb of RAM).
>
> Am I having the wrong approach to solve my problems or is there something
I
> can do to speed up the clear method?
>
> Thanks
>
> B.
>
>