Jump to content


Photo

VB Help


  • Please log in to reply
2 replies to this topic

#1 kschembri

kschembri

    Young Padawan

  • Members
  • Pip
  • 81 posts
  • Location:Canada, EH?

Posted 24 June 2005 - 01:27 AM

Alright im brand new to VB...

I put an image on the screen and now i want to set its X axis to + 1 when i press a certain button.

Whats the code for

If Key_A is pressed Than Do this

#2 ronson

ronson

    Banned For Being Purple

  • Twodded Staff
  • PipPip
  • 480 posts
  • Gender:Male
  • Location:North Yorkshire, UK
  • Interests:Rugby, Programming, Building Computers, Networking, Web Design and...........BINGE DRINKING!!!!!!.

Posted 24 June 2005 - 04:42 PM

Erm if you want it to do it when a button is pressed, double click the button then do something like

Picture1.CurrentX = Picture1.currentX + 1

Or something like that, not sure of the top of my head, i haven't worked with Axis much.

#3 NGPixel

NGPixel

    Senior Programmer

  • P2L Staff
  • PipPipPipPip
  • 1,410 posts
  • Gender:Male
  • Location:Montreal, Canada
  • Interests:Web Design : Coding : Animation

Posted 26 June 2005 - 11:24 PM

CurrentX is not used in VB, its .left attribute you need to use.

Exemple:

Private Sub Command1_Click()

        Picture1.Left = Picture1.Left + 1

End Sub





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users