-
please help, what I"m trying to do is have the object labeled Flash1 to go diagonal down the current coordinates of it is -5000(left) & -5240(top)
Code:
Dim intflashL As Single
Dim intflashT As Single
__________________________________________
Private Sub Timer2_Timer()
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1000
intflashT = intflashT + 1000
intflashL = Flash1.Left
intflashT = Flash1.Top
End If
End Sub
OH YEA.... I forgot to tell you my problem its:
when ever I start it it doesn't start at -5000,-5240
it just styarts in the middle of the screen, and goes dianolly down
thanks in advance
-
Spot the difference
Code:
Dim intflashL As Single
Dim intflashT As Single
Private Sub Timer2_Timer()
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1000
intflashT = intflashT + 1000
Flash1.Left = intflashL
Flash1.Top = intflashT
End If
End Sub
I'm not sure what all that 'Else:' business is about...
-
Re: Spot the difference
thank you, but when I click "play" it goes diananol, but it starts in the middle of the form, not at -5000,-5240
-
I need more data, whats are all the Scale* settings for your
form (.left .top. width. .height)
Also give initial top and left setting of flash1
-
Hmmm
Looks like I misunderstood your predicament. From a first look at the code you posted, I wouldn't expect the object to move at all.
Anyway, perhaps you can explain what kind of object 'Flash1' is, and also, what exactly you are trying to achieve with it? You really didn't give much away before...
:)
-
Re: Hmmm
what I'm trying to do is move the flash moive from -5000(left, where it is right now), and -5240(top, where it is right now).
to:
0 left, and 240 top
now do you know what I mean?
-
Re: Re: Hmmm
oh yea, the width and height are: 7455, and 3255
-
Try this
code:
Private Sub Timer2_Timer()
If not Flash1.Left <=1000 Then
Flash1.Left=Flash1.Left+1000
Flash1.Top=Flash1.Top+1000
Else
Flash1.Left=0
Flesh1.Top=240
End If
End Sub
-
Sorry, I tried to use the Code Format, but may I'm just to st....
-
<?>
Code:
'if I use -5000 and -5240 then the object is not on the
'form and just appears at 0 - 240 top left...
'if i set it to the bottom right hand corner of the form
'and apply this it goes diagonally from bottom right to top left.
Private Sub Form_Load()
Flash1.Left = 5000
Flash1.Top = 5240
End Sub
Private Sub Timer2_Timer()
Call MoveFlash
End Sub
Public Sub MoveFlash()
Dim intflashL As Single
Dim intflashT As Single
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1
intflashT = intflashT + 1
Flash1.Left = intflashL
Flash1.Top = intflashT
End If
End Sub
-
<?>
opus
to use code format.
SquareBracketcodeSquareBracket
bla bla code
bla bla code
SquareBrakcet/codeSquareBracket
-
ok, thanks to ALL for you HELP!!!!!!
-
Thanks Joe
I come to think Dimava uses something like [code]
Form.ScaleTop=-8000
Form.Scaleleft=-8000
[code]
??
-
you used this: (*s dont count)
[*code*]
then to close it
[*code*]
you should use this:
[*code*]
then to close it:
[*/*code*]
-
Well this is what i came up with...
Private sub Form_Activate()
'Set the image's location at the bottom left hand corner of the screen.
Image.left = Form1.left
Image.Top = Form1.ScaleHeight - Image.Height
End Sub
Private Sub Timer1_Timer()
Image.Left = Image.Left + 30
Image.Top = Image.Top - 30
End Sub
Just set your timer interval to 400.
Next time don't think so hard..