PDA

View Full Version : looping object example


jmoney3457
11-09-2007, 10:27 PM
anyone got an example code of looping an object?i'm having trouble with looping an image (object)

BarrMan
11-09-2007, 11:24 PM
Language?

jmoney3457
11-11-2007, 08:21 AM
vb.net

BarrMan
11-11-2007, 10:42 PM
vb.net
What's the problem? What's your code?

jmoney3457
11-12-2007, 02:32 AM
right now the image will go from left to right when you hit Go but i want it to go the following :
top left to right
bottom right to left
bottom to top

heres code:
Option Strict Off
Option Explicit On
Friend Class Form1

Inherits System.Windows.Forms.Form

Private Sub btngo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngo.Click
Dim intCount As Integer

For intCount = 0 To 400 Step 2
'imgfigure.Left = VB6.TwipsToPixelsX(intCount)
imgfigure.Left = intCount

Next
For intCount = 0 To -200 Step 3
'imgfigure.Left = VB6.TwipstopixelX(intCount)
imgfigure.Left = intCount
Next
End Sub

Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
Me.Close()
End Sub
End Class

jmoney3457
11-16-2007, 09:24 AM
anyone?:confused: as i'm @ a lose here..:(