KySoto

testcode

Apr 5th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.04 KB | None | 0 0
  1.     Public testimage As Image
  2.     Public MovementGrid(23, 23) As Point 'the grid everything moves on. since everything will be 24x24 the points will be 8down and 8 to the right of each corner.
  3.     Private Sub map_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  4.         'Dim temp As Image
  5.         'temp = Image.FromFile("Art\maps\map template small.png")
  6.         'Me.BackgroundImage = temp
  7.         'Me.BackgroundImageLayout = ImageLayout.None
  8.         testimage = Image.FromFile("Art\CharacterPlaceholder.png")
  9.         Dim a As Integer = 260
  10.         Dim b As Integer = 4
  11.         For i As Integer = 0 To 23 Step 1
  12.             For j As Integer = 0 To 23 Step 1
  13.                 MovementGrid(i, j) = New Point(a, b)
  14.                 Dim test As New PictureBox
  15.                 test.Image = testimage
  16.                 test.Size = New Size(24, 24)
  17.                 test.Location = MovementGrid(i, j)
  18.                 Me.Controls.Add(test)
  19.                 a += 32
  20.             Next
  21.             a = 260
  22.             b += 32
  23.         Next
  24.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment