G
Guest
Ok so im going intomaking a tetris type program and was wondering how i would
move the drawing after i have crated the shape for the shape i have this code
....
Public Class Form1
Public Sub PictureBox1_Paint1(ByVal sender As System.Object, ByVal
Block1 As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Block1.Graphics.FillRectangle(Brushes.Blue, 0, 0, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 25, 0, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 25, 25, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 50, 25, 25, 30)
End Sub
End Class
This makes a block that looks like two retangles overlapped.. now how would
i go about putting movement to this whole shape. Im assuming that i went
ahead and mde each of the blocks within the shape its own block so when you
have to dealeate a line of blocks it will be easier. But for now all i have
to know is how to put a downward movement to the blocks.
move the drawing after i have crated the shape for the shape i have this code
....
Public Class Form1
Public Sub PictureBox1_Paint1(ByVal sender As System.Object, ByVal
Block1 As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Block1.Graphics.FillRectangle(Brushes.Blue, 0, 0, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 25, 0, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 25, 25, 25, 30)
Block1.Graphics.FillRectangle(Brushes.Blue, 50, 25, 25, 30)
End Sub
End Class
This makes a block that looks like two retangles overlapped.. now how would
i go about putting movement to this whole shape. Im assuming that i went
ahead and mde each of the blocks within the shape its own block so when you
have to dealeate a line of blocks it will be easier. But for now all i have
to know is how to put a downward movement to the blocks.