Hi there:

I have a procedure that draws a grid with, say, 10 * 10 cells on it. Rather than filling each cell with a distinct color, I want to further subdivide each cell with some lines and distinct coloring.

For example, I would like to have two lines running north-south so that the cell area is divided into three equal areas.

Could you give me any lead how to do this?

Thank you.

Below I enclose my subroutine BaseMapDraw that draws each grid cell.

' Draw each grid cell.
Dim lngX As Long: Dim lngY As Long: Dim lngXCentre As Long: Dim lngYCentre As Long
' Determine the row and column by looking at values of g_udtCell().
lngX = (g_udtCell(lngCell).lngCol - 1) * m_lngWIDTH + (m_lngWIDTH / 4)
lngY = (g_udtCell(lngCell).lngRow - 1) * m_lngHEIGHT + (m_lngHEIGHT / 4)
' 'Line' draws lines + rectangles on an object. 'B' causes a box to be drawn using coordinates to specify opposite box corners. 'F' fills box with same color.
frmBaseMap.picMap.Line (lngX, lngY)-Step(m_lngWIDTH, m_lngHEIGHT), , BF
' Draws black lines around each grid cell.
frmBaseMap.picMap.ForeColor = QBColor(0)
' Without space between cells.
frmBaseMap.picMap.Line (lngX, lngY)-Step(m_lngWIDTH, m_lngHEIGHT), , B
frmBaseMap.picMap.CurrentX = lngX + (m_lngWIDTH / 2)
frmBaseMap.picMap.CurrentY = lngY + (m_lngHEIGHT / 2)