move a piece of gfx

myblueocean

Well-known member
Joined
Jun 29, 2007
Messages
161
Location
England
Programming Experience
Beginner
"Juggalo brotha" would you be able to do me a favour, free of charge ofcourse?

If I give you a piece of code can you compile it for windows mobile 03'?
 
"Juggalo brotha" would you be able to do me a favour, free of charge ofcourse?

If I give you a piece of code can you compile it for windows mobile 03'?

I might be able to, I've never made a mobile app before so I wouldn't know whether your code is working correctly or not.
 
Urm, from what I remember seeing back at college it has a simulator there? And buttons etc

I want to be able to move a piece of gfx, um it looks like you'd end up trying to make that work.

For the pc its different as you know.

VB.NET:
Public Class Form1
    Private rect As New Rectangle(0, 0, 12, 30)
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        'Get the area that was previously drawn in.
        Dim oldRect As Rectangle = Me.rect

        'Move the drawing area.
        Me.rect.Offset(10, 70)

        'Get the area that is now going to be drawin in.
        Dim newRect As Rectangle = Me.rect

        'Make each area for invalidation 1 pixel larger than the actual drawing area in every direction
        oldRect.Inflate(1, 1)
        newRect.Inflate(1, 1)

        'Notify the form that the old and new areas require repainting.
        Me.Invalidate(oldRect)
        Me.Invalidate(newRect)

        'Tell the form to repaint invalidated areas.
        Me.Update()
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        With e.Graphics
            .FillRectangle(Brushes.White, Me.rect)
            .DrawRectangle(Pens.White, Me.rect)
        End With
    End Sub
End Class
 
Last edited by a moderator:
Off topic, thread split. Put your code in code box also, you can do it yourself for the future.
 
I didn't see this, I was suprised to get a pm from you too.
 
Back
Top