Hello,
I have a few problems with making a map editor, if someone knows how to make one please reply and ill give you my msn
well actually this problem: its not making the grid invisible if you de-deselect the option "Grid On" because the rect's have already been drawn. So I need to know how you can delete them.
Code:Private Sub GridOnToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GridOnToolStripMenuItem.Click If GridOnToolStripMenuItem.Checked = True Then GridOnToolStripMenuItem.Checked = False GRID_ON = False Else GridOnToolStripMenuItem.Checked = True GRID_ON = True End If UpdateMapEditorGraphics() End SubCode:Public Sub UpdateMapEditorGraphics() If GRID_ON = True Then For x = 0 To MAX_GRID_X For y = 0 To MAX_GRID_Y sRect = New Rectangle(x * TILE_SIZE_X, y * TILE_SIZE_Y, TILE_SIZE_X, TILE_SIZE_Y) g.DrawRectangle(Pens.Black, sRect) Next Next Else 'GRAPHICS SHOULD BE MADE INVISIBLE HERE' End If End Sub![]()





Reply With Quote