2 questions

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

2 questions
  1. Unread #1 - Mar 18, 2007 at 7:43 PM
  2. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    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 :)
     
  3. Unread #2 - Mar 18, 2007 at 8:20 PM
  4. Skeletron
    Referrals:
    0

    Skeletron Guest

    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.
     
  5. Unread #3 - Mar 19, 2007 at 5:57 PM
  6. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    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
     
  7. Unread #4 - Mar 20, 2007 at 6:25 PM
  8. Skeletron
    Referrals:
    0

    Skeletron Guest

    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.
     
  9. Unread #5 - Mar 20, 2007 at 8:02 PM
  10. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site