Adblock breaks this site

2 questions

Discussion in 'Programming General' started by kharg0, Mar 18, 2007.

  1. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    2 questions

    i've decided to make a little video game so i've made my visual look and i need some help with this...

    #1 i would like to know how to make it so when you press the up arrow on the keyboard an image goes up one pixel

    #2 how to make it so when you press the a button on the keyboard it shows the image change from standing there to attacking?

    thx :)
     
  2. Skeletron

    Skeletron Guest

    Referrals:
    0
    2 questions

    In this code, make a button called button1 and make a picture box called picturebox1.

    w - pushes the button up by 4
    a - pushes the button left by 4
    d - pushes the button right by 4
    s - pushes the button back by 4
    q - press it once and it will change to the image to a lite image, press it again and it will change it to a darker, repeating.
     
  3. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    2 questions

    alright do you know where i can get a list of key names like "A" would probably be called "A" but what would the arrow keys be called??

    thx
     
  4. Skeletron

    Skeletron Guest

    Referrals:
    0
    2 questions

    This lines converts it's letter (A) to a Chr using the Asc function.

    Try googleing something like "arrow keys ascii" or something like that.
     
  5. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    2 questions

    ok thx skeletron
    :)

    ok i looked it up and the second one i belive has a ascii text thingy but visual basic seems to take the first letter and use it so if i say shtkgmfvkigkfkfkvk its gona use s and if it's UP i have to hold shift and press u or press caps lock and press u so ya...
     
< Basic Java Tutorial | Force Windows 95/98 to crash on startup >


 
 
Adblock breaks this site