Hey guys can someone take a peek at this code and tell me where I am going wrong. I am creating labels at runtime. Inside the .tag property I have a structure. Everytime I attempt to update the structure the .tag property doesn't update.
Here is the structure:
Here is how I am attempting to update it. As I step through it the structure itself is updated but the instance of the structure inside the tag doesn't seem to update. Any ideas?Code:Public Structure structChip Dim kingStatus As Boolean Dim currentTileLoc As Integer Dim currX As Integer Dim currY As Integer Dim previousTileLoc As Integer Dim prevX As Integer Dim prevY As Integer Dim jumped As Boolean Dim selected As Boolean Dim name As String Dim checkerColor As String Dim boardSquareColor As String End Structure
Code:Dim checkers As New Windows.Forms.Label With checkers .Name = checkArray.Name .Image = Image.FromFile("..\checkerGreentileRed1.gif") .AutoSize = False .Size = New Size(40, 40) .Parent = frmBoard.picBoard .Visible = True .BringToFront() .Location = New Point(x, y) .Tag = Nothing 'update the structure checkStruct.previousTileLoc = checkStruct.currentTileLoc checkStruct.prevX = checkStruct.currX checkStruct.prevY = checkStruct.currY checkStruct.currentTileLoc = tile checkStruct.currX = x checkStruct.currY = y checkStruct.checkerColor = greenWithRed checkStruct.selected = False .Tag = checkStruct End With





Reply With Quote