<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>VBForums - Games and Graphics Programming</title>
		<link>http://www.vbforums.com/</link>
		<description>Post your questions about every aspect of developing games and graphics applications. Topics include using DirectX and the GDI32 API, XNA,etc. (non-VB questions allowed)</description>
		<language>en</language>
		<lastBuildDate>Thu, 23 May 2013 00:19:32 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.vbforums.com/images/misc/rss.png</url>
			<title>VBForums - Games and Graphics Programming</title>
			<link>http://www.vbforums.com/</link>
		</image>
		<item>
			<title>How to play sound from memory using mciSendString APIrecord</title>
			<link>http://www.vbforums.com/showthread.php?722191-How-to-play-sound-from-memory-using-mciSendString-APIrecord&amp;goto=newpost</link>
			<pubDate>Sun, 19 May 2013 18:03:44 GMT</pubDate>
			<description>VB 6

I know how to play sounds from reading a .wav file but I need to be able to play sounds from memory. I want to load a wave file into a byte array and then be able to play from that array using mciSendString.</description>
			<content:encoded><![CDATA[<div>VB 6<br />
<br />
I know how to play sounds from reading a .wav file but I need to be able to play sounds from memory. I want to load a wave file into a byte array and then be able to play from that array using mciSendString.</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>jmsrickland</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?722191-How-to-play-sound-from-memory-using-mciSendString-APIrecord</guid>
		</item>
		<item>
			<title>Creating 2 player pong, not working!</title>
			<link>http://www.vbforums.com/showthread.php?722071-Creating-2-player-pong-not-working!&amp;goto=newpost</link>
			<pubDate>Sat, 18 May 2013 02:10:50 GMT</pubDate>
			<description><![CDATA[So I'm trying to create a 2 player pong game, however I have 2 problems.
1. After adding a moving ball, the player1's paddle will now not move. The arrow keys will not make it move, however it was all working before adding the ball
2. I haven't done this in this version yet, but in another version I added 2 players, and only one player could move at a time. As soon as I used the arrow keys (player 1) player 2 could not move using WASD.

Thanks for any help! I'm using VB 2008 Express, Code below:

Code:
---------
Public Class Pong

    

    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        Select Case e.KeyCode
            Case Keys.Left
                Me.Player1.Left -= 1
            Case Keys.Up
                Me.Player1.Top -= 1
            Case Keys.Right
                Me.Player1.Left += 1
            Case Keys.Down
                Me.Player1.Top += 1
        End Select
    End Sub
    Private Sub Ball_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles Ball.PreviewKeyDown
        Select Case e.KeyCode
            Case Keys.Left, Keys.Up, Keys.Right, Keys.Down
                e.IsInputKey = True
        End Select
    End Sub

    Private Sub Pong_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    'Set up ball speeed and movement
    Dim speed As Single = 10
    'Create a random instance to keep the game exciting
    Dim rndInst As New Random()
    'Set the minimum and maximum angle of randomisation
    Dim xVel As Single = Math.Cos(rndInst.Next(8, 12)) * speed
    Dim yVel As Single = Math.Sin(rndInst.Next(4, 14)) * speed
    Private Sub Gametimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Gametimer.Tick
        'Move the ball
        Ball.Location = New Point(Ball.Location.X + xVel, Ball.Location.Y + yVel)

        'Now we must make sure the ball never leaves the game area
        If Ball.Location.Y < 0 Then
            Ball.Location = New Point(Ball.Location.X, 0)
            'Set the velocity to the opposite of the velocity when hitting the ball
            yVel = -yVel
        End If

        'Check if the ball hits the bottom of the playing feild
        If Ball.Location.Y > Me.Height - Ball.Size.Height - 45 Then
            Ball.Location = New Point(Ball.Location.X, Me.Height - Ball.Size.Height - 45)
            yVel = -yVel
        End If

        'Check if the ball hits a players paddle
        If Ball.Bounds.IntersectsWith(Player1.Bounds) Then
            Ball.Location = New Point(Player1.Location.X - Ball.Size.Width, Ball.Location.Y)
            xVel = -xVel
        End If

        'Check if the ball hits a players paddle
        If Ball.Bounds.IntersectsWith(player2.Bounds) Then
            Ball.Location = New Point(player2.Location.X + Ball.Size.Width, Ball.Location.Y)
            xVel = -xVel
        End If



    End Sub

    Private Sub Ball_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ball.Click

    End Sub

    Private Sub play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles play.Click
        Gametimer.Enabled = True
    End Sub
End Class
---------
]]></description>
			<content:encoded><![CDATA[<div>So I'm trying to create a 2 player pong game, however I have 2 problems.<br />
1. After adding a moving ball, the player1's paddle will now not move. The arrow keys will not make it move, however it was all working before adding the ball<br />
2. I haven't done this in this version yet, but in another version I added 2 players, and only one player could move at a time. As soon as I used the arrow keys (player 1) player 2 could not move using WASD.<br />
<br />
Thanks for any help! I'm using VB 2008 Express, Code below:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Public Class Pong<br />
<br />
&nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown<br />
&nbsp; &nbsp; &nbsp; &nbsp; Select Case e.KeyCode<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Left<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me.Player1.Left -= 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Up<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me.Player1.Top -= 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Right<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me.Player1.Left += 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Down<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Me.Player1.Top += 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />
&nbsp; &nbsp; End Sub<br />
&nbsp; &nbsp; Private Sub Ball_PreviewKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.PreviewKeyDownEventArgs) Handles Ball.PreviewKeyDown<br />
&nbsp; &nbsp; &nbsp; &nbsp; Select Case e.KeyCode<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Left, Keys.Up, Keys.Right, Keys.Down<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.IsInputKey = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub Pong_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; 'Set up ball speeed and movement<br />
&nbsp; &nbsp; Dim speed As Single = 10<br />
&nbsp; &nbsp; 'Create a random instance to keep the game exciting<br />
&nbsp; &nbsp; Dim rndInst As New Random()<br />
&nbsp; &nbsp; 'Set the minimum and maximum angle of randomisation<br />
&nbsp; &nbsp; Dim xVel As Single = Math.Cos(rndInst.Next(8, 12)) * speed<br />
&nbsp; &nbsp; Dim yVel As Single = Math.Sin(rndInst.Next(4, 14)) * speed<br />
&nbsp; &nbsp; Private Sub Gametimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Gametimer.Tick<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Move the ball<br />
&nbsp; &nbsp; &nbsp; &nbsp; Ball.Location = New Point(Ball.Location.X + xVel, Ball.Location.Y + yVel)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Now we must make sure the ball never leaves the game area<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Ball.Location.Y &lt; 0 Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ball.Location = New Point(Ball.Location.X, 0)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'Set the velocity to the opposite of the velocity when hitting the ball<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yVel = -yVel<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Check if the ball hits the bottom of the playing feild<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Ball.Location.Y &gt; Me.Height - Ball.Size.Height - 45 Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ball.Location = New Point(Ball.Location.X, Me.Height - Ball.Size.Height - 45)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yVel = -yVel<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Check if the ball hits a players paddle<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Ball.Bounds.IntersectsWith(Player1.Bounds) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ball.Location = New Point(Player1.Location.X - Ball.Size.Width, Ball.Location.Y)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xVel = -xVel<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 'Check if the ball hits a players paddle<br />
&nbsp; &nbsp; &nbsp; &nbsp; If Ball.Bounds.IntersectsWith(player2.Bounds) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ball.Location = New Point(player2.Location.X + Ball.Size.Width, Ball.Location.Y)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xVel = -xVel<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
<br />
<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub Ball_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ball.Click<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub play_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles play.Click<br />
&nbsp; &nbsp; &nbsp; &nbsp; Gametimer.Enabled = True<br />
&nbsp; &nbsp; End Sub<br />
End Class</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Creaturemagic</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?722071-Creating-2-player-pong-not-working!</guid>
		</item>
		<item>
			<title>Create a 3d enviroment-animation and control actios with .net</title>
			<link>http://www.vbforums.com/showthread.php?721691-Create-a-3d-enviroment-animation-and-control-actios-with-net&amp;goto=newpost</link>
			<pubDate>Wed, 15 May 2013 04:23:59 GMT</pubDate>
			<description>Hi.
I am looking on how could i create a 3d environment that i can control with visual studio. An example is that i have a 3d drawer and i click the mouse to the drawer, it then opens and some code is executed in .net .
I am looking at 3dstudio with maxscript and trying to find examples with direct3d (ideally 3ds max projects that will be re-encoded in directx (show a directxmax plug in but have no clue if this helps) but i only get some C++ examples and nothing else.
Any suggestions?
Thanks.</description>
			<content:encoded><![CDATA[<div>Hi.<br />
I am looking on how could i create a 3d environment that i can control with visual studio. An example is that i have a 3d drawer and i click the mouse to the drawer, it then opens and some code is executed in .net .<br />
I am looking at 3dstudio with maxscript and trying to find examples with direct3d (ideally 3ds max projects that will be re-encoded in directx (show a directxmax plug in but have no clue if this helps) but i only get some C++ examples and nothing else.<br />
Any suggestions?<br />
Thanks.</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>sapator</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?721691-Create-a-3d-enviroment-animation-and-control-actios-with-net</guid>
		</item>
		<item>
			<title><![CDATA[[VB 6] Need Help PLEASE READ]]></title>
			<link>http://www.vbforums.com/showthread.php?721639-Need-Help-PLEASE-READ&amp;goto=newpost</link>
			<pubDate>Tue, 14 May 2013 18:00:53 GMT</pubDate>
			<description><![CDATA[I知 working on a project and i need to use keychar.I need to check to make sure the first character is A-I and that the second Character is 1-9 and only allow that.
Here's some code,

    Private Sub txtPlayerFireLocation_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtPlayerFireLocation.KeyPress
        If txtPlayerFireLocation.Text.Length = 1 Then
            If (e.KeyChar < "A" And e.KeyChar > "I") And e.KeyChar <> ControlChars.Back Then
                e.Handled = True
            End If
        End If

        If txtPlayerFireLocation.Text.Length = 2 Then
            If (e.KeyChar < "0" And e.KeyChar > "9") And e.KeyChar <> ControlChars.Back Then
                e.Handled = True
            End If
        End If
    End Sub
End Class

Please help]]></description>
			<content:encoded><![CDATA[<div>I知 working on a project and i need to use keychar.I need to check to make sure the first character is A-I and that the second Character is 1-9 and only allow that.<br />
Here's some code,<br />
<br />
    Private Sub txtPlayerFireLocation_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtPlayerFireLocation.KeyPress<br />
        If txtPlayerFireLocation.Text.Length = 1 Then<br />
            If (e.KeyChar &lt; &quot;A&quot; And e.KeyChar &gt; &quot;I&quot;) And e.KeyChar &lt;&gt; ControlChars.Back Then<br />
                e.Handled = True<br />
            End If<br />
        End If<br />
<br />
        If txtPlayerFireLocation.Text.Length = 2 Then<br />
            If (e.KeyChar &lt; &quot;0&quot; And e.KeyChar &gt; &quot;9&quot;) And e.KeyChar &lt;&gt; ControlChars.Back Then<br />
                e.Handled = True<br />
            End If<br />
        End If<br />
    End Sub<br />
End Class<br />
<br />
Please help</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Jokersmoke106</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?721639-Need-Help-PLEASE-READ</guid>
		</item>
		<item>
			<title><![CDATA[[RESOLVED] [VB6] - wall collision precision]]></title>
			<link>http://www.vbforums.com/showthread.php?721011-RESOLVED-VB6-wall-collision-precision&amp;goto=newpost</link>
			<pubDate>Thu, 09 May 2013 10:39:26 GMT</pubDate>
			<description><![CDATA[is these function correct for test the collision?

Code:
---------
Public Function TestCollision(X1 As Long, Y1 As Long, Width1 As Long, Height1 As Long, X2 As Long, Y2 As Long, Width2 As Long, Height2 As Long) As Boolean
    If (X1 + Width1 >= X2 And X1 <= X2 + Width2) And (Y1 + Height1 >= Y2 And Y1 <= Y2 + Height2) Then
        TestCollision = True
    Else
        TestCollision = False
    End If
End Function
---------
i'm trying use it, but isn't working:(

Code:
---------
Private Type CollisionDirections
    Left As Boolean
    Right As Boolean
    Up As Boolean
    Down As Boolean
End Type

Const PlayerSpeed As Integer = 5
Dim dirCollision As CollisionDirections

Private Sub sprPlayer_KeyDown(KeyCode As Integer, Shift As Integer, KeyDownTime As Long)
    Dim i As Integer
    
    If (KeyCode = vbKeyLeft) Then
        For i = 0 To sprWall.Count - 1
            If (sprPlayer.TestCollision(sprPlayer.Left - PlayerSpeed, sprPlayer.Top, sprPlayer.Width, sprPlayer.Height, sprWall(i).Left, sprWall(i).Top, sprWall(i).Width, sprWall(i).Height) = True) Then
                dirCollision.Left = True
            Else
                dirCollision.Left = False
            End If
            
            
        Next i
        
        If dirCollision.Left = False Then sprPlayer.Left = sprPlayer.Left - PlayerSpeed
.......
---------
anyone can tell me what i'm doing wrong?]]></description>
			<content:encoded><![CDATA[<div>is these function correct for test the collision?<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Public Function TestCollision(X1 As Long, Y1 As Long, Width1 As Long, Height1 As Long, X2 As Long, Y2 As Long, Width2 As Long, Height2 As Long) As Boolean<br />
&nbsp; &nbsp; If (X1 + Width1 &gt;= X2 And X1 &lt;= X2 + Width2) And (Y1 + Height1 &gt;= Y2 And Y1 &lt;= Y2 + Height2) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; TestCollision = True<br />
&nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; TestCollision = False<br />
&nbsp; &nbsp; End If<br />
End Function</code><hr />
</div>i'm trying use it, but isn't working:(<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">Private Type CollisionDirections<br />
&nbsp; &nbsp; Left As Boolean<br />
&nbsp; &nbsp; Right As Boolean<br />
&nbsp; &nbsp; Up As Boolean<br />
&nbsp; &nbsp; Down As Boolean<br />
End Type<br />
<br />
Const PlayerSpeed As Integer = 5<br />
Dim dirCollision As CollisionDirections<br />
<br />
Private Sub sprPlayer_KeyDown(KeyCode As Integer, Shift As Integer, KeyDownTime As Long)<br />
&nbsp; &nbsp; Dim i As Integer<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; If (KeyCode = vbKeyLeft) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; For i = 0 To sprWall.Count - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If (sprPlayer.TestCollision(sprPlayer.Left - PlayerSpeed, sprPlayer.Top, sprPlayer.Width, sprPlayer.Height, sprWall(i).Left, sprWall(i).Top, sprWall(i).Width, sprWall(i).Height) = True) Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dirCollision.Left = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dirCollision.Left = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; Next i<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; If dirCollision.Left = False Then sprPlayer.Left = sprPlayer.Left - PlayerSpeed<br />
.......</code><hr />
</div>anyone can tell me what i'm doing wrong?</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>joaquim</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?721011-RESOLVED-VB6-wall-collision-precision</guid>
		</item>
		<item>
			<title><![CDATA[[VB.NET] Connect Four Help]]></title>
			<link>http://www.vbforums.com/showthread.php?720845-Connect-Four-Help&amp;goto=newpost</link>
			<pubDate>Tue, 07 May 2013 19:01:08 GMT</pubDate>
			<description><![CDATA[Hello, I'm trying to make a connect four game. It's all going well until i try to determine the winner. I'm using images for the black and red pieces (which is required) and I can't do a statement like If pic1.image=pic7.image and intplayer=1 then messagebox.show("black wins"). I get an error with the "=". here's my code, skip to the bottom for the winner part. Feel free to give any suggestions on an easier way to do this if you'd like. This is a 7x6 board. I figured there would be a loop or something but I don't know how to do that. And my teacher mentioned something about two dimensional arrays..? Thanks!

Public Class Form1
    Dim btnclicked As Integer
    Dim imgplayer As Image = Image.FromFile("black.png")
    Dim intcounter1 As Integer
    Dim intcounter2 As Integer
    Dim intcounter3 As Integer
    Dim intcounter4 As Integer
    Dim intcounter5 As Integer
    Dim intcounter6 As Integer
    Dim intcounter7 As Integer
    Dim intplayer As Integer = 1 'represents black
    Private Sub btnMove_Click(sender As Object, e As EventArgs) Handles btn1.Click, btn2.Click, btn3.Click, btn4.Click, btn5.Click, btn6.Click, btn7.Click
        btnclicked = sender.tag
        If btnclicked = 1 Then
            Call Move1()
        ElseIf btnclicked = 2 Then
            Call Move2()
        ElseIf btnclicked = 3 Then
            Call Move3()
        ElseIf btnclicked = 4 Then
            Call Move4()
        ElseIf btnclicked = 5 Then
            Call Move5()
        ElseIf btnclicked = 6 Then
            Call Move6()
        ElseIf btnclicked = 7 Then
            Call Move7()
        End If
    End Sub
    Sub Move1()
        If intcounter1 < 1 And btnclicked = 1 Then
            pic6.Image = imgplayer
        ElseIf intcounter1 < 2 And btnclicked = 1 Then
            pic5.Image = imgplayer
        ElseIf intcounter1 < 3 And btnclicked = 1 Then
            pic4.Image = imgplayer
        ElseIf intcounter1 < 4 And btnclicked = 1 Then
            pic3.Image = imgplayer
        ElseIf intcounter1 < 5 And btnclicked = 1 Then
            pic2.Image = imgplayer
        ElseIf intcounter1 < 6 And btnclicked = 1 Then
            pic1.Image = imgplayer
        End If
        intcounter1 = intcounter1 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move2()
        If intcounter2 < 1 And btnclicked = 2 Then
            pic12.Image = imgplayer
        ElseIf intcounter2 < 2 And btnclicked = 2 Then
            pic11.Image = imgplayer
        ElseIf intcounter2 < 3 And btnclicked = 2 Then
            pic10.Image = imgplayer
        ElseIf intcounter2 < 4 And btnclicked = 2 Then
            pic9.Image = imgplayer
        ElseIf intcounter2 < 5 And btnclicked = 2 Then
            pic8.Image = imgplayer
        ElseIf intcounter2 < 6 And btnclicked = 2 Then
            pic7.Image = imgplayer
        End If
        intcounter2 = intcounter2 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move3()
       If intcounter3 < 1 And btnclicked = 3 Then
            pic18.Image = imgplayer
        ElseIf intcounter3 < 2 And btnclicked = 3 Then
            pic17.Image = imgplayer
        ElseIf intcounter3 < 3 And btnclicked = 3 Then
            pic16.Image = imgplayer
        ElseIf intcounter3 < 4 And btnclicked = 3 Then
            pic15.Image = imgplayer
        ElseIf intcounter3 < 5 And btnclicked = 3 Then
            pic14.Image = imgplayer
        ElseIf intcounter3 < 6 And btnclicked = 3 Then
            pic13.Image = imgplayer
        End If
        intcounter3 = intcounter3 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move4()
        If intcounter4 < 1 And btnclicked = 4 Then
            pic24.Image = imgplayer
        ElseIf intcounter4 < 2 And btnclicked = 4 Then
            pic23.Image = imgplayer
        ElseIf intcounter4 < 3 And btnclicked = 4 Then
            pic22.Image = imgplayer
        ElseIf intcounter4 < 4 And btnclicked = 4 Then
            pic21.Image = imgplayer
        ElseIf intcounter4 < 5 And btnclicked = 4 Then
            pic20.Image = imgplayer
        ElseIf intcounter4 < 6 And btnclicked = 4 Then
            pic19.Image = imgplayer
        End If
        intcounter4 = intcounter4 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move5()
        If intcounter5 < 1 And btnclicked = 5 Then
            pic30.Image = imgplayer
        ElseIf intcounter5 < 2 And btnclicked = 5 Then
            pic29.Image = imgplayer
        ElseIf intcounter5 < 3 And btnclicked = 5 Then
            pic28.Image = imgplayer
        ElseIf intcounter5 < 4 And btnclicked = 5 Then
            pic27.Image = imgplayer
        ElseIf intcounter5 < 5 And btnclicked = 5 Then
            pic26.Image = imgplayer
        ElseIf intcounter5 < 6 And btnclicked = 5 Then
            pic25.Image = imgplayer
        End If
        intcounter5 = intcounter5 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move6()
        If intcounter6 < 1 And btnclicked = 6 Then
            pic36.Image = imgplayer
        ElseIf intcounter6 < 2 And btnclicked = 6 Then
            pic35.Image = imgplayer
        ElseIf intcounter6 < 3 And btnclicked = 6 Then
            pic34.Image = imgplayer
        ElseIf intcounter6 < 4 And btnclicked = 6 Then
            pic33.Image = imgplayer
        ElseIf intcounter6 < 5 And btnclicked = 6 Then
            pic32.Image = imgplayer
        ElseIf intcounter6 < 6 And btnclicked = 6 Then
            pic31.Image = imgplayer
        End If
        intcounter6 = intcounter6 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Move7()
        If intcounter7 < 1 And btnclicked = 7 Then
            pic42.Image = imgplayer
        ElseIf intcounter7 < 2 And btnclicked = 7 Then
            pic41.Image = imgplayer
        ElseIf intcounter7 < 3 And btnclicked = 7 Then
            pic40.Image = imgplayer
        ElseIf intcounter7 < 4 And btnclicked = 7 Then
            pic39.Image = imgplayer
        ElseIf intcounter7 < 5 And btnclicked = 7 Then
            pic38.Image = imgplayer
        ElseIf intcounter7 < 6 And btnclicked = 7 Then
            pic37.Image = imgplayer
        End If
        intcounter7 = intcounter7 + 1
        If intplayer = 1 Then
            intplayer = 2
            imgplayer = Image.FromFile("red.png")
        Else
            intplayer = 1
            imgplayer = Image.FromFile("black.png")
        End If
    End Sub
    Sub Winner()
        If _*'Where I Need Help*_
            MessageBox.Show("Black Wins")
        End If
    End Sub
End Class]]></description>
			<content:encoded><![CDATA[<div>Hello, I'm trying to make a connect four game. It's all going well until i try to determine the winner. I'm using images for the black and red pieces (which is required) and I can't do a statement like If pic1.image=pic7.image and intplayer=1 then messagebox.show(&quot;black wins&quot;). I get an error with the &quot;=&quot;. here's my code, skip to the bottom for the winner part. Feel free to give any suggestions on an easier way to do this if you'd like. This is a 7x6 board. I figured there would be a loop or something but I don't know how to do that. And my teacher mentioned something about two dimensional arrays..? Thanks!<br />
<br />
Public Class Form1<br />
    Dim btnclicked As Integer<br />
    Dim imgplayer As Image = Image.FromFile(&quot;black.png&quot;)<br />
    Dim intcounter1 As Integer<br />
    Dim intcounter2 As Integer<br />
    Dim intcounter3 As Integer<br />
    Dim intcounter4 As Integer<br />
    Dim intcounter5 As Integer<br />
    Dim intcounter6 As Integer<br />
    Dim intcounter7 As Integer<br />
    Dim intplayer As Integer = 1 'represents black<br />
    Private Sub btnMove_Click(sender As Object, e As EventArgs) Handles btn1.Click, btn2.Click, btn3.Click, btn4.Click, btn5.Click, btn6.Click, btn7.Click<br />
        btnclicked = sender.tag<br />
        If btnclicked = 1 Then<br />
            Call Move1()<br />
        ElseIf btnclicked = 2 Then<br />
            Call Move2()<br />
        ElseIf btnclicked = 3 Then<br />
            Call Move3()<br />
        ElseIf btnclicked = 4 Then<br />
            Call Move4()<br />
        ElseIf btnclicked = 5 Then<br />
            Call Move5()<br />
        ElseIf btnclicked = 6 Then<br />
            Call Move6()<br />
        ElseIf btnclicked = 7 Then<br />
            Call Move7()<br />
        End If<br />
    End Sub<br />
    Sub Move1()<br />
        If intcounter1 &lt; 1 And btnclicked = 1 Then<br />
            pic6.Image = imgplayer<br />
        ElseIf intcounter1 &lt; 2 And btnclicked = 1 Then<br />
            pic5.Image = imgplayer<br />
        ElseIf intcounter1 &lt; 3 And btnclicked = 1 Then<br />
            pic4.Image = imgplayer<br />
        ElseIf intcounter1 &lt; 4 And btnclicked = 1 Then<br />
            pic3.Image = imgplayer<br />
        ElseIf intcounter1 &lt; 5 And btnclicked = 1 Then<br />
            pic2.Image = imgplayer<br />
        ElseIf intcounter1 &lt; 6 And btnclicked = 1 Then<br />
            pic1.Image = imgplayer<br />
        End If<br />
        intcounter1 = intcounter1 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move2()<br />
        If intcounter2 &lt; 1 And btnclicked = 2 Then<br />
            pic12.Image = imgplayer<br />
        ElseIf intcounter2 &lt; 2 And btnclicked = 2 Then<br />
            pic11.Image = imgplayer<br />
        ElseIf intcounter2 &lt; 3 And btnclicked = 2 Then<br />
            pic10.Image = imgplayer<br />
        ElseIf intcounter2 &lt; 4 And btnclicked = 2 Then<br />
            pic9.Image = imgplayer<br />
        ElseIf intcounter2 &lt; 5 And btnclicked = 2 Then<br />
            pic8.Image = imgplayer<br />
        ElseIf intcounter2 &lt; 6 And btnclicked = 2 Then<br />
            pic7.Image = imgplayer<br />
        End If<br />
        intcounter2 = intcounter2 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move3()<br />
       If intcounter3 &lt; 1 And btnclicked = 3 Then<br />
            pic18.Image = imgplayer<br />
        ElseIf intcounter3 &lt; 2 And btnclicked = 3 Then<br />
            pic17.Image = imgplayer<br />
        ElseIf intcounter3 &lt; 3 And btnclicked = 3 Then<br />
            pic16.Image = imgplayer<br />
        ElseIf intcounter3 &lt; 4 And btnclicked = 3 Then<br />
            pic15.Image = imgplayer<br />
        ElseIf intcounter3 &lt; 5 And btnclicked = 3 Then<br />
            pic14.Image = imgplayer<br />
        ElseIf intcounter3 &lt; 6 And btnclicked = 3 Then<br />
            pic13.Image = imgplayer<br />
        End If<br />
        intcounter3 = intcounter3 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move4()<br />
        If intcounter4 &lt; 1 And btnclicked = 4 Then<br />
            pic24.Image = imgplayer<br />
        ElseIf intcounter4 &lt; 2 And btnclicked = 4 Then<br />
            pic23.Image = imgplayer<br />
        ElseIf intcounter4 &lt; 3 And btnclicked = 4 Then<br />
            pic22.Image = imgplayer<br />
        ElseIf intcounter4 &lt; 4 And btnclicked = 4 Then<br />
            pic21.Image = imgplayer<br />
        ElseIf intcounter4 &lt; 5 And btnclicked = 4 Then<br />
            pic20.Image = imgplayer<br />
        ElseIf intcounter4 &lt; 6 And btnclicked = 4 Then<br />
            pic19.Image = imgplayer<br />
        End If<br />
        intcounter4 = intcounter4 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move5()<br />
        If intcounter5 &lt; 1 And btnclicked = 5 Then<br />
            pic30.Image = imgplayer<br />
        ElseIf intcounter5 &lt; 2 And btnclicked = 5 Then<br />
            pic29.Image = imgplayer<br />
        ElseIf intcounter5 &lt; 3 And btnclicked = 5 Then<br />
            pic28.Image = imgplayer<br />
        ElseIf intcounter5 &lt; 4 And btnclicked = 5 Then<br />
            pic27.Image = imgplayer<br />
        ElseIf intcounter5 &lt; 5 And btnclicked = 5 Then<br />
            pic26.Image = imgplayer<br />
        ElseIf intcounter5 &lt; 6 And btnclicked = 5 Then<br />
            pic25.Image = imgplayer<br />
        End If<br />
        intcounter5 = intcounter5 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move6()<br />
        If intcounter6 &lt; 1 And btnclicked = 6 Then<br />
            pic36.Image = imgplayer<br />
        ElseIf intcounter6 &lt; 2 And btnclicked = 6 Then<br />
            pic35.Image = imgplayer<br />
        ElseIf intcounter6 &lt; 3 And btnclicked = 6 Then<br />
            pic34.Image = imgplayer<br />
        ElseIf intcounter6 &lt; 4 And btnclicked = 6 Then<br />
            pic33.Image = imgplayer<br />
        ElseIf intcounter6 &lt; 5 And btnclicked = 6 Then<br />
            pic32.Image = imgplayer<br />
        ElseIf intcounter6 &lt; 6 And btnclicked = 6 Then<br />
            pic31.Image = imgplayer<br />
        End If<br />
        intcounter6 = intcounter6 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Move7()<br />
        If intcounter7 &lt; 1 And btnclicked = 7 Then<br />
            pic42.Image = imgplayer<br />
        ElseIf intcounter7 &lt; 2 And btnclicked = 7 Then<br />
            pic41.Image = imgplayer<br />
        ElseIf intcounter7 &lt; 3 And btnclicked = 7 Then<br />
            pic40.Image = imgplayer<br />
        ElseIf intcounter7 &lt; 4 And btnclicked = 7 Then<br />
            pic39.Image = imgplayer<br />
        ElseIf intcounter7 &lt; 5 And btnclicked = 7 Then<br />
            pic38.Image = imgplayer<br />
        ElseIf intcounter7 &lt; 6 And btnclicked = 7 Then<br />
            pic37.Image = imgplayer<br />
        End If<br />
        intcounter7 = intcounter7 + 1<br />
        If intplayer = 1 Then<br />
            intplayer = 2<br />
            imgplayer = Image.FromFile(&quot;red.png&quot;)<br />
        Else<br />
            intplayer = 1<br />
            imgplayer = Image.FromFile(&quot;black.png&quot;)<br />
        End If<br />
    End Sub<br />
    Sub Winner()<br />
        If <i><u><b>'Where I Need Help</b></u></i><br />
            MessageBox.Show(&quot;Black Wins&quot;)<br />
        End If<br />
    End Sub<br />
End Class</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Hell0</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?720845-Connect-Four-Help</guid>
		</item>
		<item>
			<title>Help Coverting something that been driving me mad for years!</title>
			<link>http://www.vbforums.com/showthread.php?720257-Help-Coverting-something-that-been-driving-me-mad-for-years!&amp;goto=newpost</link>
			<pubDate>Thu, 02 May 2013 18:55:57 GMT</pubDate>
			<description><![CDATA[A simple google search found me this forum!

I have been trying to attempt to convert this program for years! (Game)

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12612&lngWId=1

I have genuinely attempted and tried but got nowhere. Pointers? Or something!]]></description>
			<content:encoded><![CDATA[<div>A simple google search found me this forum!<br />
<br />
I have been trying to attempt to convert this program for years! (Game)<br />
<br />
<a rel="nofollow" href="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=12612&amp;lngWId=1" target="_blank">http://www.planet-source-code.com/vb...12612&amp;lngWId=1</a><br />
<br />
I have genuinely attempted and tried but got nowhere. Pointers? Or something!</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>NUTTER123</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?720257-Help-Coverting-something-that-been-driving-me-mad-for-years!</guid>
		</item>
		<item>
			<title>Drawing 2D on Direct3D device</title>
			<link>http://www.vbforums.com/showthread.php?720155-Drawing-2D-on-Direct3D-device&amp;goto=newpost</link>
			<pubDate>Thu, 02 May 2013 03:09:35 GMT</pubDate>
			<description><![CDATA[Err, not a new question, huh?
For example: I wanna draw, and fill a rectangle, 80% opacity on the device. (You can see this in NFSMW). This is intro so i'll not touch to coordinates yet.
Also with circles, ellipses. How can I do that (especially when it's it totally opaque)?]]></description>
			<content:encoded><![CDATA[<div>Err, not a new question, huh?<br />
For example: I wanna draw, and fill a rectangle, 80% opacity on the device. (You can see this in NFSMW). This is intro so i'll not touch to coordinates yet.<br />
Also with circles, ellipses. How can I do that (especially when it's it totally opaque)?</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>PAPYRON</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?720155-Drawing-2D-on-Direct3D-device</guid>
		</item>
		<item>
			<title><![CDATA[[VB 6] Help with parallel arrays and loop statments]]></title>
			<link>http://www.vbforums.com/showthread.php?719999-Help-with-parallel-arrays-and-loop-statments&amp;goto=newpost</link>
			<pubDate>Tue, 30 Apr 2013 16:51:51 GMT</pubDate>
			<description><![CDATA[I'm working on a battleship game in vb. I have designed the game so there are 2 grids 9 by 9 or 81 buttons each. I need help makeing the arrays and the loop statments that check through the arrays to see which has been clicked. I was wondering if anyone knew how to do this and if someone could help by supplying some code.

Thanks and please help]]></description>
			<content:encoded><![CDATA[<div>I'm working on a battleship game in vb. I have designed the game so there are 2 grids 9 by 9 or 81 buttons each. I need help makeing the arrays and the loop statments that check through the arrays to see which has been clicked. I was wondering if anyone knew how to do this and if someone could help by supplying some code.<br />
<br />
Thanks and please help</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Jokersmoke106</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719999-Help-with-parallel-arrays-and-loop-statments</guid>
		</item>
		<item>
			<title><![CDATA[[VB 6] two-demensional arrays PLEASE HELP]]></title>
			<link>http://www.vbforums.com/showthread.php?719809-two-demensional-arrays-PLEASE-HELP&amp;goto=newpost</link>
			<pubDate>Mon, 29 Apr 2013 17:40:14 GMT</pubDate>
			<description>I知 now working with two-dimensional arrays. I need to run them through two loops one for the row and another for the column. This is so they can cross check through 81 buttons to see which is clicked. I could use help in doing this since I am completely lost. Some codes that may or may not help to help u better understand what I知 trying to do.  

 Public Preset1Formation() As Button =
{Form2.btnA1, Form2.btnB1, Form2.btnC1, Form2.btnD1, Form2.btnE1, Form2.btnC2, Form2.btnC3, Form2.btnC4, Form2.btnC5, Form2.btnD3, Form2.btnE3, Form2.btnF3, Form2.btnG1, Form2.btnG2, Form2.btnG3, Form2.btnG6, Form2.btnG7}

    Public PlayerButtonArray(,) As Button = {{Form2.btnA1, Form2.btnA2, Form2.btnA3, Form2.btnA4, Form2.btnA5, Form2.btnA6, Form2.btnA7, Form2.btnA8, Form2.btnA9},
                                          {Form2.btnB1, Form2.btnB2, Form2.btnB3, Form2.btnB4, Form2.btnB5, Form2.btnB6, Form2.btnB7, Form2.btnB8, Form2.btnB9},
                                          {Form2.btnC1, Form2.btnC2, Form2.btnC3, Form2.btnC4, Form2.btnC5, Form2.btnC6, Form2.btnC7, Form2.btnC8, Form2.btnC9},
                                          {Form2.btnD1, Form2.btnD2, Form2.btnD3, Form2.btnD4, Form2.btnD5, Form2.btnD6, Form2.btnD7, Form2.btnD8, Form2.btnD9},
                                          {Form2.btnE1, Form2.btnE2, Form2.btnE3, Form2.btnE4, Form2.btnE5, Form2.btnE6, Form2.btnE7, Form2.btnE8, Form2.btnE9},
                                          {Form2.btnF1, Form2.btnF2, Form2.btnF3, Form2.btnF4, Form2.btnF5, Form2.btnF6, Form2.btnF7, Form2.btnF8, Form2.btnF9},
                                          {Form2.btnG1, Form2.btnG2, Form2.btnG3, Form2.btnG4, Form2.btnG5, Form2.btnG6, Form2.btnG7, Form2.btnG8, Form2.btnG9},
                                          {Form2.btnH1, Form2.btnH2, Form2.btnH3, Form2.btnH4, Form2.btnH5, Form2.btnH6, Form2.btnH7, Form2.btnH8, Form2.btnH9},
                                          {Form2.btnI1, Form2.btnI2, Form2.btnI3, Form2.btnI4, Form2.btnI5, Form2.btnI6, Form2.btnI7, Form2.btnI8, Form2.btnI9}}

please include any and all code that you would use. Also hint suggestions statments ideas or anything else that you think could or would help, please state.</description>
			<content:encoded><![CDATA[<div>I知 now working with two-dimensional arrays. I need to run them through two loops one for the row and another for the column. This is so they can cross check through 81 buttons to see which is clicked. I could use help in doing this since I am completely lost. Some codes that may or may not help to help u better understand what I知 trying to do.  <br />
<br />
 Public Preset1Formation() As Button =<br />
{Form2.btnA1, Form2.btnB1, Form2.btnC1, Form2.btnD1, Form2.btnE1, Form2.btnC2, Form2.btnC3, Form2.btnC4, Form2.btnC5, Form2.btnD3, Form2.btnE3, Form2.btnF3, Form2.btnG1, Form2.btnG2, Form2.btnG3, Form2.btnG6, Form2.btnG7}<br />
<br />
    Public PlayerButtonArray(,) As Button = {{Form2.btnA1, Form2.btnA2, Form2.btnA3, Form2.btnA4, Form2.btnA5, Form2.btnA6, Form2.btnA7, Form2.btnA8, Form2.btnA9},<br />
                                          {Form2.btnB1, Form2.btnB2, Form2.btnB3, Form2.btnB4, Form2.btnB5, Form2.btnB6, Form2.btnB7, Form2.btnB8, Form2.btnB9},<br />
                                          {Form2.btnC1, Form2.btnC2, Form2.btnC3, Form2.btnC4, Form2.btnC5, Form2.btnC6, Form2.btnC7, Form2.btnC8, Form2.btnC9},<br />
                                          {Form2.btnD1, Form2.btnD2, Form2.btnD3, Form2.btnD4, Form2.btnD5, Form2.btnD6, Form2.btnD7, Form2.btnD8, Form2.btnD9},<br />
                                          {Form2.btnE1, Form2.btnE2, Form2.btnE3, Form2.btnE4, Form2.btnE5, Form2.btnE6, Form2.btnE7, Form2.btnE8, Form2.btnE9},<br />
                                          {Form2.btnF1, Form2.btnF2, Form2.btnF3, Form2.btnF4, Form2.btnF5, Form2.btnF6, Form2.btnF7, Form2.btnF8, Form2.btnF9},<br />
                                          {Form2.btnG1, Form2.btnG2, Form2.btnG3, Form2.btnG4, Form2.btnG5, Form2.btnG6, Form2.btnG7, Form2.btnG8, Form2.btnG9},<br />
                                          {Form2.btnH1, Form2.btnH2, Form2.btnH3, Form2.btnH4, Form2.btnH5, Form2.btnH6, Form2.btnH7, Form2.btnH8, Form2.btnH9},<br />
                                          {Form2.btnI1, Form2.btnI2, Form2.btnI3, Form2.btnI4, Form2.btnI5, Form2.btnI6, Form2.btnI7, Form2.btnI8, Form2.btnI9}}<br />
<br />
please include any and all code that you would use. Also hint suggestions statments ideas or anything else that you think could or would help, please state.</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Jokersmoke106</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719809-two-demensional-arrays-PLEASE-HELP</guid>
		</item>
		<item>
			<title>Problem in DirectX</title>
			<link>http://www.vbforums.com/showthread.php?719629-Problem-in-DirectX&amp;goto=newpost</link>
			<pubDate>Sat, 27 Apr 2013 19:54:43 GMT</pubDate>
			<description><![CDATA[Hi guys;

I have new problem in DirectX

I work in vb 2010 .net with DirectX

I've written this program

I have problem in InitializeGraphics() function ,It show this error

Attachment 99539 (http://www.vbforums.com/attachment.php?attachmentid=99539)

in the attachment my program
Attachment 99541 (http://www.vbforums.com/attachment.php?attachmentid=99541)]]></description>
			<content:encoded><![CDATA[<div>Hi guys;<br />
<br />
I have new problem in DirectX<br />
<br />
I work in vb 2010 .net with DirectX<br />
<br />
I've written this program<br />
<br />
I have problem in InitializeGraphics() function ,It show this error<br />
<br />
<img src="http://www.vbforums.com/attachment.php?attachmentid=99539&amp;d=1367092349" border="0" alt="Name:  Untitled2.png
Views: 30
Size:  11.2 KB"  /><br />
<br />
in the attachment my program<br />
<a href="http://www.vbforums.com/attachment.php?attachmentid=99541&amp;d=1367092420"  title="Name:  3D Game.zip
Views: 12
Size:  77.0 KB">3D Game.zip</a></div>


	<div style="padding:10px">

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
				<div style="padding:10px">
				<img class="attach" src="http://www.vbforums.com/attachment.php?attachmentid=99539&amp;stc=1&amp;d=1367092349" alt="" />&nbsp;
			</div>
		</fieldset>
	

	

	
		<fieldset class="fieldset">
			<legend>Attached Files</legend>
			<ul>
			<li>
	<img class="inlineimg" src="http://www.vbforums.com/images/attach/zip.gif" alt="File Type: zip" />
	<a href="http://www.vbforums.com/attachment.php?attachmentid=99541&amp;d=1367092420">3D Game.zip</a> 
(77.0 KB)
</li>
			</ul>
		</fieldset>
	

	</div>
]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>PowerProg</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719629-Problem-in-DirectX</guid>
		</item>
		<item>
			<title>Problem in XNA 4.0</title>
			<link>http://www.vbforums.com/showthread.php?719627-Problem-in-XNA-4-0&amp;goto=newpost</link>
			<pubDate>Sat, 27 Apr 2013 19:22:06 GMT</pubDate>
			<description>Hi guys;

I have new problem in XNA 4.0

I work in C# 2010 .net with XNA 4.0

but if I go to run game , It show this message

Attachment 99535 (http://www.vbforums.com/attachment.php?attachmentid=99535)</description>
			<content:encoded><![CDATA[<div>Hi guys;<br />
<br />
I have new problem in XNA 4.0<br />
<br />
I work in C# 2010 .net with XNA 4.0<br />
<br />
but if I go to run game , It show this message<br />
<br />
<img src="http://www.vbforums.com/attachment.php?attachmentid=99535&amp;d=1367090509" border="0" alt="Name:  Untitled.png
Views: 45
Size:  47.9 KB"  /></div>


	<div style="padding:10px">

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
				<div style="padding:10px">
				<img class="attach" src="http://www.vbforums.com/attachment.php?attachmentid=99535&amp;stc=1&amp;d=1367090509" alt="" />&nbsp;
			</div>
		</fieldset>
	

	

	

	</div>
]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>PowerProg</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719627-Problem-in-XNA-4-0</guid>
		</item>
		<item>
			<title><![CDATA[i need some advices that i can't find easly:(]]></title>
			<link>http://www.vbforums.com/showthread.php?719597-i-need-some-advices-that-i-can-t-find-easly-(&amp;goto=newpost</link>
			<pubDate>Sat, 27 Apr 2013 11:44:34 GMT</pubDate>
			<description>about frames count:
1 - i capture the actual time with GetTickCount() api function to TempStart.
2 - inside of game loop i count the frames;
3 - i capture the next time with GetTickCount() api function to TempEnd.
4 - i do TempEnd - TempStart and if is more and igual than 1000, i put the frames count to another variable and i reset the frame count.
is these pesudo-code correct?</description>
			<content:encoded><![CDATA[<div>about frames count:<br />
1 - i capture the actual time with GetTickCount() api function to TempStart.<br />
2 - inside of game loop i count the frames;<br />
3 - i capture the next time with GetTickCount() api function to TempEnd.<br />
4 - i do TempEnd - TempStart and if is more and igual than 1000, i put the frames count to another variable and i reset the frame count.<br />
is these pesudo-code correct?</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>joaquim</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719597-i-need-some-advices-that-i-can-t-find-easly-(</guid>
		</item>
		<item>
			<title>NullReferenceException was unhandled Help (Picturebox array)</title>
			<link>http://www.vbforums.com/showthread.php?719455-NullReferenceException-was-unhandled-Help-(Picturebox-array)&amp;goto=newpost</link>
			<pubDate>Fri, 26 Apr 2013 12:11:09 GMT</pubDate>
			<description><![CDATA[I'm making a game, similar to Tron apart from it will move slowly and also whenever one of the players presses a key.
This works okay but it can not work properly when trying to see if one of the players has lost the game.

Here is the part of the code I get an error in:


Code:
---------
    Private Sub Snake_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        Select Case e.KeyCode
            Case Keys.Left Or Keys.Right Or Keys.Up Or Keys.Down
                CountP2 = CountP2 + 1
                TailP2(CountP2) = New PictureBox
                Controls.Add(TailP2(CountP2))
                With TailP2(CountP2)
                    .Visible = True
                    .Width = 20
                    .Height = 20
                    .BackColor = Color.MidnightBlue
                    .Parent = Panel1
                    .Location = HeadP2.Location
                End With
            Case Keys.Right
                MoveTimerP2.Enabled = False
                DirectionP2 = "Right"
                HeadP2.Left += 20
                MoveTimerP2.Enabled = True
                e.Handled = True
            Case Keys.Left
                MoveTimerP2.Enabled = False
                DirectionP2 = "Left"
                HeadP2.Left -= 20
                MoveTimerP2.Enabled = True
                e.Handled = True
            Case Keys.Up
                MoveTimerP2.Enabled = False
                DirectionP2 = "Up"
                HeadP2.Top -= 20
                MoveTimerP2.Enabled = True
                e.Handled = True
            Case Keys.Down
                MoveTimerP2.Enabled = False
                DirectionP1 = "Down"
                HeadP2.Top += 20
                MoveTimerP2.Enabled = True
                e.Handled = True

            Case Keys.D Or Keys.A Or Keys.W Or Keys.S
                CountP1 = CountP1 + 1
                TailP1(CountP1) = New PictureBox
                Controls.Add(TailP1(CountP1))
                With TailP1(CountP1)
                    .Visible = True
                    .Width = 20
                    .Height = 20
                    .BackColor = Color.MidnightBlue
                    .Parent = Panel1
                    .Location = HeadP1.Location
                End With
            Case Keys.D
                MoveTimerP1.Enabled = False
                DirectionP1 = "Right"
                HeadP1.Left += 20
                MoveTimerP1.Enabled = True
                e.Handled = True
            Case Keys.A
                MoveTimerP1.Enabled = False
                DirectionP1 = "Left"
                HeadP1.Left -= 20
                MoveTimerP1.Enabled = True
                e.Handled = True
            Case Keys.W
                MoveTimerP1.Enabled = False
                DirectionP1 = "Up"
                HeadP1.Top -= 20
                MoveTimerP1.Enabled = True
                e.Handled = True
            Case Keys.S
                MoveTimerP1.Enabled = False
                DirectionP1 = "Down"
                HeadP1.Top += 20
                MoveTimerP1.Enabled = True
                e.Handled = True
        End Select
            For i As Integer = CountP1 To 0 Step -1
                If HeadP1.Location = TailP1(i).Location Then
                    P2Win()
                End If
            Next
            For i As Integer = CountP1 To 0 Step -1
                If HeadP1.Location = TailP1(i).Location Then
                    P2Win()
                End If
            Next
            For i As Integer = CountP2 To 0 Step -1
                If HeadP2.Location = TailP2(i).Location Then
                    P1Win()
                End If
            Next
            For i As Integer = CountP2 To 0 Step -1
                If HeadP2.Location = TailP2(i).Location Then
                    P1Win()
                End If
            Next
    End Sub

    Private Sub Startup()

    End Sub

    Private Sub MoveTimerP1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MoveTimerP1.Tick
        CountP1 = CountP1 + 1
        TailP1(CountP1) = New PictureBox
        Controls.Add(TailP1(CountP1))
        With TailP1(CountP1)
            .Visible = True
            .Width = 20
            .Height = 20
            .BackColor = Color.MidnightBlue
            .Parent = Panel1
            .Location = HeadP1.Location
        End With
        If DirectionP1 = "Left" Then
            MoveTimerP1.Enabled = False
            HeadP1.Left -= 20
            MoveTimerP1.Enabled = True
        ElseIf DirectionP1 = "Right" Then
            MoveTimerP1.Enabled = False
            HeadP1.Left += 20
            MoveTimerP1.Enabled = True
        ElseIf DirectionP1 = "Up" Then
            MoveTimerP1.Enabled = False
            HeadP1.Top -= 20
            MoveTimerP1.Enabled = True
        ElseIf DirectionP1 = "Down" Then
            MoveTimerP1.Enabled = False
            HeadP1.Top += 20
            MoveTimerP1.Enabled = True
        End If
            For i As Integer = CountP1 To 0 Step -1
                If HeadP1.Location = TailP1(i).Location Then
                    P2Win()
                End If
            Next
            For i As Integer = CountP1 To 0 Step -1
                If HeadP2.Location = TailP1(i).Location Then
                    P1Win()
                End If
            Next
    End Sub

    Private Sub MoveTimerP2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MoveTimerP2.Tick
        CountP2 = CountP2 + 1
        TailP2(CountP2) = New PictureBox
        Controls.Add(TailP2(CountP2))
        With TailP2(CountP2)
            .Visible = True
            .Width = 20
            .Height = 20
            .BackColor = Color.MidnightBlue
            .Parent = Panel1
            .Location = HeadP2.Location
        End With
        If DirectionP2 = "Left" Then
            MoveTimerP2.Enabled = False
            HeadP2.Left -= 20
            MoveTimerP2.Enabled = True
        ElseIf DirectionP2 = "Right" Then
            MoveTimerP2.Enabled = False
            HeadP2.Left += 20
            MoveTimerP2.Enabled = True
        ElseIf DirectionP2 = "Up" Then
            MoveTimerP2.Enabled = False
            HeadP2.Top -= 20
            MoveTimerP2.Enabled = True
        ElseIf DirectionP2 = "Down" Then
            MoveTimerP2.Enabled = False
            HeadP2.Top += 20
            MoveTimerP2.Enabled = True
        End If
            For i As Integer = CountP2 To 0 Step -1
                If HeadP2.Location = TailP2(i).Location Then
                    P1Win()
                End If
            Next
            For i As Integer = CountP2 To 0 Step -1
                If HeadP1.Location = TailP2(i).Location Then
                    P2Win()
                End If
            Next
    End Sub
---------
The problem comes in the place where the loops are. Even though the pictureboxes are made and declared as new picturebox, it still seems to think they don't exist!]]></description>
			<content:encoded><![CDATA[<div>I'm making a game, similar to Tron apart from it will move slowly and also whenever one of the players presses a key.<br />
This works okay but it can not work properly when trying to see if one of the players has lost the game.<br />
<br />
Here is the part of the code I get an error in:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&nbsp; &nbsp; Private Sub Snake_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown<br />
&nbsp; &nbsp; &nbsp; &nbsp; Select Case e.KeyCode<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Left Or Keys.Right Or Keys.Up Or Keys.Down<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CountP2 = CountP2 + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TailP2(CountP2) = New PictureBox<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Controls.Add(TailP2(CountP2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With TailP2(CountP2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Visible = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Width = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Height = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .BackColor = Color.MidnightBlue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Parent = Panel1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Location = HeadP2.Location<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Right<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP2 = &quot;Right&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Left += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Left<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP2 = &quot;Left&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Left -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Up<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP2 = &quot;Up&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Top -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.Down<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP1 = &quot;Down&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Top += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.D Or Keys.A Or Keys.W Or Keys.S<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CountP1 = CountP1 + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TailP1(CountP1) = New PictureBox<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Controls.Add(TailP1(CountP1))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; With TailP1(CountP1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Visible = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Width = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Height = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .BackColor = Color.MidnightBlue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Parent = Panel1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Location = HeadP1.Location<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.D<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP1 = &quot;Right&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Left += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.A<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP1 = &quot;Left&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Left -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.W<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP1 = &quot;Up&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Top -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Keys.S<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DirectionP1 = &quot;Down&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Top += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.Handled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP1 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP1.Location = TailP1(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P2Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP1 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP1.Location = TailP1(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P2Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP2 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP2.Location = TailP2(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P1Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP2 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP2.Location = TailP2(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P1Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub Startup()<br />
<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub MoveTimerP1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MoveTimerP1.Tick<br />
&nbsp; &nbsp; &nbsp; &nbsp; CountP1 = CountP1 + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; TailP1(CountP1) = New PictureBox<br />
&nbsp; &nbsp; &nbsp; &nbsp; Controls.Add(TailP1(CountP1))<br />
&nbsp; &nbsp; &nbsp; &nbsp; With TailP1(CountP1)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Visible = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Width = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Height = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .BackColor = Color.MidnightBlue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Parent = Panel1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Location = HeadP1.Location<br />
&nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; If DirectionP1 = &quot;Left&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Left -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP1 = &quot;Right&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Left += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP1 = &quot;Up&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Top -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP1 = &quot;Down&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP1.Top += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP1.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP1 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP1.Location = TailP1(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P2Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP1 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP2.Location = TailP1(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P1Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; End Sub<br />
<br />
&nbsp; &nbsp; Private Sub MoveTimerP2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MoveTimerP2.Tick<br />
&nbsp; &nbsp; &nbsp; &nbsp; CountP2 = CountP2 + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; TailP2(CountP2) = New PictureBox<br />
&nbsp; &nbsp; &nbsp; &nbsp; Controls.Add(TailP2(CountP2))<br />
&nbsp; &nbsp; &nbsp; &nbsp; With TailP2(CountP2)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Visible = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Width = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Height = 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .BackColor = Color.MidnightBlue<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Parent = Panel1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Location = HeadP2.Location<br />
&nbsp; &nbsp; &nbsp; &nbsp; End With<br />
&nbsp; &nbsp; &nbsp; &nbsp; If DirectionP2 = &quot;Left&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Left -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP2 = &quot;Right&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Left += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP2 = &quot;Up&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Top -= 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; ElseIf DirectionP2 = &quot;Down&quot; Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = False<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HeadP2.Top += 20<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MoveTimerP2.Enabled = True<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP2 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP2.Location = TailP2(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P1Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For i As Integer = CountP2 To 0 Step -1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If HeadP1.Location = TailP2(i).Location Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; P2Win()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Next<br />
&nbsp; &nbsp; End Sub</code><hr />
</div>The problem comes in the place where the loops are. Even though the pictureboxes are made and declared as new picturebox, it still seems to think they don't exist!</div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>Alevo</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719455-NullReferenceException-was-unhandled-Help-(Picturebox-array)</guid>
		</item>
		<item>
			<title>Poker to Texas Hodlem</title>
			<link>http://www.vbforums.com/showthread.php?719233-Poker-to-Texas-Hodlem&amp;goto=newpost</link>
			<pubDate>Wed, 24 Apr 2013 17:03:59 GMT</pubDate>
			<description><![CDATA[Hello,

I am using VB express 2010 for a class that I'm taking. We are supposed to make a game and what I decided to do is blackjack. I downloaded the starter kit from visual studio gallery and what I would like to do is modify that code so the player can play Texas Hold-em too. I know how to play both games but I'm not entirely sure what I need use or add so that the program will work. Obviously I can use the cards, numbers, odds, and what not but I'm not sure what else should be done or really how to do it. I'm new to VB but I can understand a lot of what I don't know. I have 2 weeks to write this.

Thanks,

Cheekson

p.s. If I'm being too vague I can add more details. Also this is the link to the starter kit
http://visualstudiogallery.msdn.microsoft.com/ba4638ad-a2d2-49e5-ae46-94e0f747cae0]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am using VB express 2010 for a class that I'm taking. We are supposed to make a game and what I decided to do is blackjack. I downloaded the starter kit from visual studio gallery and what I would like to do is modify that code so the player can play Texas Hold-em too. I know how to play both games but I'm not entirely sure what I need use or add so that the program will work. Obviously I can use the cards, numbers, odds, and what not but I'm not sure what else should be done or really how to do it. I'm new to VB but I can understand a lot of what I don't know. I have 2 weeks to write this.<br />
<br />
Thanks,<br />
<br />
Cheekson<br />
<br />
p.s. If I'm being too vague I can add more details. Also this is the link to the starter kit<br />
<a rel="nofollow" href="http://visualstudiogallery.msdn.microsoft.com/ba4638ad-a2d2-49e5-ae46-94e0f747cae0" target="_blank">http://visualstudiogallery.msdn.micr...6-94e0f747cae0</a></div>

]]></content:encoded>
			<category domain="http://www.vbforums.com/forumdisplay.php?2-Games-and-Graphics-Programming">Games and Graphics Programming</category>
			<dc:creator>cheekson</dc:creator>
			<guid isPermaLink="true">http://www.vbforums.com/showthread.php?719233-Poker-to-Texas-Hodlem</guid>
		</item>
	</channel>
</rss>
