Imports System.Drawing
Imports System.Drawing.Drawing2D

Public Class RoomView
    ' Constants for grid dimensions and indentation
    Const INDENT As Integer = 20
    Const SQCOUNTX As Integer = 15
    Const SQCOUNTY As Integer = 11
    Const WALL_THICKNESS As Integer = 10

    ' Class-level variables
    Dim WallX(SQCOUNTX, SQCOUNTY) As Boolean ' Vertical walls, including edges
    Dim WallY(SQCOUNTX, SQCOUNTY) As Boolean ' Horizontal walls, including edges
    Dim SQSizeX As Integer
    Dim SQSizeY As Integer
    Dim highlightedX As Integer
    Dim highlightedY As Integer
    Dim highlightedWallX As Boolean = False
    Dim highlightedWallY As Boolean = False

    ' Variables for mouse state
    Dim isRightMouseDown As Boolean = False
    Dim isLeftMouseDown As Boolean = False
    Dim isMouseInsideGrid As Boolean = False

    ' Constructor
    Public Sub New()
        ' This call is required by the designer.
        InitializeComponent()

        ' Initialize walls
        For i As Integer = 0 To SQCOUNTX
            For j As Integer = 0 To SQCOUNTY
                WallX(i, j) = True
                WallY(i, j) = True
            Next
        Next
    End Sub

    ' Event handler for PicGame's Paint event
    Private Sub PicGame_Paint(sender As Object, e As PaintEventArgs) Handles PicGame.Paint
        ' Calculate the square size based on the size of the PictureBox
        CalculateSquareSizes()

        ' Set SmoothingMode to None to prevent gaps due to anti-aliasing
        e.Graphics.SmoothingMode = SmoothingMode.None

        ' Draw the walls, intersections, and highlights
        DrawWalls(e.Graphics)
        DrawIntersections(e.Graphics)
        DrawHighlight(e.Graphics)
    End Sub

    ' Event handler for resizing the form
    Private Sub RoomView_Resize(sender As Object, e As EventArgs) Handles Me.Resize
        If PicGame.ClientSize.Width > 0 AndAlso PicGame.ClientSize.Height > 0 Then
            CalculateSquareSizes()
            PicGame.Invalidate() ' Redraw the PictureBox
        End If
    End Sub

    ' Method to calculate square sizes
    Private Sub CalculateSquareSizes()
        If PicGame.ClientSize.Width > 0 AndAlso PicGame.ClientSize.Height > 0 Then
            SQSizeX = (PicGame.ClientSize.Width - 2 * INDENT - WALL_THICKNESS * (SQCOUNTX + 1)) \ SQCOUNTX
            SQSizeY = (PicGame.ClientSize.Height - 2 * INDENT - WALL_THICKNESS * (SQCOUNTY + 1)) \ SQCOUNTY
        End If
    End Sub

    ' Method to draw the walls
    Private Sub DrawWalls(g As Graphics)
        Dim xOrigin As Integer = INDENT
        Dim yOrigin As Integer = INDENT

        ' Draw vertical walls (WallX)
        For i As Integer = 0 To SQCOUNTX
            For j As Integer = 0 To SQCOUNTY - 1
                Dim x As Integer = xOrigin + i * (SQSizeX + WALL_THICKNESS) - WALL_THICKNESS \ 2
                Dim y As Integer = yOrigin + j * (SQSizeY + WALL_THICKNESS) + WALL_THICKNESS \ 2

                If WallX(i, j) Then
                    ' Vertical wall
                    g.FillRectangle(Brushes.Red, x, y, WALL_THICKNESS, SQSizeY)
                End If
            Next
        Next

        ' Draw horizontal walls (WallY)
        For i As Integer = 0 To SQCOUNTX - 1
            For j As Integer = 0 To SQCOUNTY
                Dim x As Integer = xOrigin + i * (SQSizeX + WALL_THICKNESS) + WALL_THICKNESS \ 2
                Dim y As Integer = yOrigin + j * (SQSizeY + WALL_THICKNESS) - WALL_THICKNESS \ 2

                If WallY(i, j) Then
                    ' Horizontal wall
                    g.FillRectangle(Brushes.Red, x, y, SQSizeX, WALL_THICKNESS)
                End If
            Next
        Next
    End Sub

    ' Method to draw intersection squares
    Private Sub DrawIntersections(g As Graphics)
        Dim xOrigin As Integer = INDENT
        Dim yOrigin As Integer = INDENT

        For i As Integer = 0 To SQCOUNTX
            For j As Integer = 0 To SQCOUNTY
                Dim x As Integer = xOrigin + i * (SQSizeX + WALL_THICKNESS) - WALL_THICKNESS \ 2
                Dim y As Integer = yOrigin + j * (SQSizeY + WALL_THICKNESS) - WALL_THICKNESS \ 2

                ' Draw intersection square
                g.FillRectangle(Brushes.Red, x, y, WALL_THICKNESS, WALL_THICKNESS)
            Next
        Next
    End Sub

    ' Method to draw the highlight
    Private Sub DrawHighlight(g As Graphics)
        If Not isMouseInsideGrid Then
            Return
        End If

        Dim xOrigin As Integer = INDENT
        Dim yOrigin As Integer = INDENT

        If highlightedWallX Then
            ' Vertical wall
            Dim x As Integer = xOrigin + highlightedX * (SQSizeX + WALL_THICKNESS) - WALL_THICKNESS \ 2
            Dim y As Integer = yOrigin + highlightedY * (SQSizeY + WALL_THICKNESS) + WALL_THICKNESS \ 2
            Dim highlightRect As New Rectangle(x, y, WALL_THICKNESS, SQSizeY)
            Using highlightPen As New Pen(Color.Black, 2)
                g.DrawRectangle(highlightPen, highlightRect)
            End Using
        ElseIf highlightedWallY Then
            ' Horizontal wall
            Dim x As Integer = xOrigin + highlightedX * (SQSizeX + WALL_THICKNESS) + WALL_THICKNESS \ 2
            Dim y As Integer = yOrigin + highlightedY * (SQSizeY + WALL_THICKNESS) - WALL_THICKNESS \ 2
            Dim highlightRect As New Rectangle(x, y, SQSizeX, WALL_THICKNESS)
            Using highlightPen As New Pen(Color.Black, 2)
                g.DrawRectangle(highlightPen, highlightRect)
            End Using
        Else
            ' Square
            Dim x As Integer = xOrigin + highlightedX * (SQSizeX + WALL_THICKNESS) + WALL_THICKNESS \ 2
            Dim y As Integer = yOrigin + highlightedY * (SQSizeY + WALL_THICKNESS) + WALL_THICKNESS \ 2
            Dim highlightRect As New Rectangle(x, y, SQSizeX, SQSizeY)
            Using highlightPen As New Pen(Color.Black, 2)
                g.DrawRectangle(highlightPen, highlightRect)
            End Using
        End If
    End Sub

    ' Event handler for PicGame's MouseMove event
    Private Sub PicGame_MouseMove(sender As Object, e As MouseEventArgs) Handles PicGame.MouseMove
        ' Initialize as False at the start of the method
        isMouseInsideGrid = False

        ' Adjust for indentation
        Dim mouseX As Integer = e.X - INDENT
        Dim mouseY As Integer = e.Y - INDENT

        ' Early exit if the mouse is outside the grid area
        If mouseX < 0 OrElse mouseY < 0 Then
            STB.Text = "Outside Grid"
            Exit Sub
        End If

        Dim cellSizeX As Integer = SQSizeX + WALL_THICKNESS
        Dim cellSizeY As Integer = SQSizeY + WALL_THICKNESS

        Dim cellX As Integer = mouseX \ cellSizeX
        Dim cellY As Integer = mouseY \ cellSizeY

        If cellX >= SQCOUNTX OrElse cellY >= SQCOUNTY Then
            STB.Text = "Outside Grid"
            Exit Sub
        End If

        Dim offsetX As Integer = mouseX Mod cellSizeX
        Dim offsetY As Integer = mouseY Mod cellSizeY

        highlightedWallX = False
        highlightedWallY = False

        If offsetX < WALL_THICKNESS Then
            ' Vertical wall (WallX)
            If cellX = 0 OrElse cellX = SQCOUNTX Then
                ' Border wall, do not highlight
                STB.Text = "Outside Grid"
                Exit Sub
            End If
            highlightedWallX = True
            highlightedX = cellX
            highlightedY = cellY
            STB.Text = $"WallX({cellX},{cellY})"
            isMouseInsideGrid = True

            ' Wall modification code
            If isRightMouseDown Then
                If WallX(cellX, cellY) Then
                    WallX(cellX, cellY) = False
                    PicGame.Invalidate()
                End If
            ElseIf isLeftMouseDown Then
                If Not WallX(cellX, cellY) Then
                    WallX(cellX, cellY) = True
                    PicGame.Invalidate()
                End If
            End If

        ElseIf offsetY < WALL_THICKNESS Then
            ' Horizontal wall (WallY)
            If cellY = 0 OrElse cellY = SQCOUNTY Then
                ' Border wall, do not highlight
                STB.Text = "Outside Grid"
                Exit Sub
            End If
            highlightedWallY = True
            highlightedX = cellX
            highlightedY = cellY
            STB.Text = $"WallY({cellX},{cellY})"
            isMouseInsideGrid = True

            ' Wall modification code
            If isRightMouseDown Then
                If WallY(cellX, cellY) Then
                    WallY(cellX, cellY) = False
                    PicGame.Invalidate()
                End If
            ElseIf isLeftMouseDown Then
                If Not WallY(cellX, cellY) Then
                    WallY(cellX, cellY) = True
                    PicGame.Invalidate()
                End If
            End If

        ElseIf offsetX >= WALL_THICKNESS AndAlso offsetX < cellSizeX AndAlso offsetY >= WALL_THICKNESS AndAlso offsetY < cellSizeY Then
            ' Inside the square
            highlightedX = cellX
            highlightedY = cellY
            STB.Text = $"Square({cellX},{cellY})"
            isMouseInsideGrid = True
        Else
            STB.Text = "Outside Grid"
            Exit Sub
        End If

        ' Redraw to update the highlight
        PicGame.Invalidate()
    End Sub

    ' Event handler for MouseDown on PicGame
    Private Sub PicGame_MouseDown(sender As Object, e As MouseEventArgs) Handles PicGame.MouseDown
        If e.Button = MouseButtons.Right Then
            isRightMouseDown = True
        ElseIf e.Button = MouseButtons.Left Then
            isLeftMouseDown = True
        End If
    End Sub

    ' Event handler for MouseUp on PicGame
    Private Sub PicGame_MouseUp(sender As Object, e As MouseEventArgs) Handles PicGame.MouseUp
        If e.Button = MouseButtons.Right Then
            isRightMouseDown = False
        ElseIf e.Button = MouseButtons.Left Then
            isLeftMouseDown = False
        End If
    End Sub

    Private Sub PicGame_Click(sender As Object, e As EventArgs) Handles PicGame.Click
        ' Handle click events if needed
    End Sub

End Class

I've added a Menu to the above. 

New (mnuNew), Save (mnuSave), SaveAs (mnuSaveAs), Load (mnuLoad)

Can you add the code?