1 Replies - 3590 Views - Last Post: 30 May 2008 - 12:28 PM Rate Topic: -----

#1 akumar2508  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-May 08

moving a image randomly in the programe

Post icon  Posted 30 May 2008 - 01:45 AM

Private Sub Form_Load()
Image1.Picture = LoadPicture(App.Path & "/images/bimal.jpg")
End Sub

Private Sub Timer1_Timer()
Randomize (1000)
e = (ScaleWidth * Rnd)
d = (ScaleWidth * Rnd)
Image1.Move ( d,e) 'here is the problem'
End Sub

Is This A Good Question/Topic? 0
  • +

Replies To: moving a image randomly in the programe

#2 Zhalix  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 260
  • Joined: 07-May 08

Re: moving a image randomly in the programe

Posted 30 May 2008 - 12:28 PM

Last line, take away the parenthesis.

Private Sub Form_Load()
Image1.Picture = LoadPicture(App.Path & "/images/bimal.jpg")
End Sub

Private Sub Timer1_Timer()
Randomize (1000)
e = (ScaleWidth * Rnd)
d = (ScaleWidth * Rnd)
Image1.Move d, e 
End Sub



Tell me if that helps.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1