Need help with this college project,
1.      Create a two player Tic-Tac-Toe game using pictureboxes as the 9 possible squares (you will have to design your own graphics for the O and X in paint).  
a.      Create a sub routine called XO_Click with the appropriate click arguments.  This routine should fill the clicked picturebox with the appropriate image.
b.      Dynamically add nine pictureboxes to your form.
c.      Dynamically assign the click event for each of these picturesboxes to your XO_Click code.
here is my code so far...

Am I i in the right track....
Public Class FrmMain
    Private Const intNumSpaces As Int16 = 9
    Private Const intSpacePerRow As Int16 = 3
    Private Const intxHeight As Int16 = 122
    Private Const intxWidth As Int16 = 115
    Private Const intMargin As Int16 = 20
    Private Const intLabelHeight As Int16 = 23
    Private titleBarHeight As Int16
    Private Sub FrmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim intBorderWidth As Int16 = (Me.Width - Me.ClientSize.Width) / 2
        titleBarHeight = Me.Height - Me.ClientSize.Height - 2 * intBorderWidth
        'set height and width of form
        Me.Height = Math.Ceiling(intNumSpaces / intSpacePerRow) * (intxHeight _
                    + intLabelHeight) + intMargin + titleBarHeight + 2 * intBorderWidth
        Me.Width = intSpacePerRow * (intxWidth + intLabelHeight) + intMargin + 2 * intBorderWidth
        'center form
        Me.Left = (My.Computer.Screen.WorkingArea.Width - Me.Width) / 2
        Me.Top = (My.Computer.Screen.WorkingArea.Height - Me.Height) / 2
        Dim i As Int16
        'loop through chairs
        For i = 0 To intNumSpaces - 1
            Dim seat As New PictureBox
            seat.Parent = Me
            seat.Left = (i Mod intSpacePerRow) * (intxWidth + intLabelHeight) + intMargin
            seat.Top = (i \ intSpacePerRow) * (intxHeight + intLabelHeight) + intMargin
            seat.Height = intxHeight
            seat.Width = intxWidth
            seat.Image = Image.FromFile("..\..\images\x.jpg")
            seat.Name = (i + 1).ToString
            seat.Tag = ""
    End Sub
    Private Sub XO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim p As PictureBox
        p = CType(sender, PictureBox)
    End Sub
End Class

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.