LineCutter,
Thank you for your response.
I think that I might be tackiling the problem in completely the wrong way.
My App draws the grid on the Forelayer using FLine, as shown in the code below.
Code:
Sub DrawGrid
Designer.ForeLayer=True
Designer.Fline(Designer.Width-170,10,Designer.Width-10,165,cBlack,B)
For Row=0 To 15
Designer.Fline(Designer.Width-170,10+(10*Row),Designer.Width-10,15+(10*Row),cBlack,B)
Next
For Col=0 To 15
Designer.Fline(Designer.Width-165+(10*Col),10,Designer.Width-160+(10*Col),165,cBlack,B)
Next
Designer.Line(Designer.Width-170,10,Designer.Width-10,165,cWhite,BF)
Designer.FLine(10,10,Designer.Width-170,165,cBlack,B)
End Sub
I have no recording system that will allow me to 'flag' the parts of the grid a line passes through.
It was my intention to draw the line and then locate each part of the grid that contained the line and fill the entire 5x5 square.
I've managed to draw the line wherever the user wants it but fallen over when it comes to trying to determine which parts to fill.
Do I need to use an array or matrix kind of approach?
How does MS Paint Brush calculate a line, my program will be very simple in that the uses a mousedown event for the start position and the end position will be set by the point that the mouseup event is fired. I'd love to be able to show and update the position of the line as it is being drawn but this is beyond my ability I think.
Is it time to go back to the drawing-board (pardon the pun) and start again
Regards,
RandomCoder