Results 1 to 3 of 3

Thread: How to use the ascii commands

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    7

    How to use the ascii commands

    well i know all the ascii key codes but how to use them?

    if i for example want to move imgBall 500 twips left if i press "d" , what should i write then? It just can't figure it out
    I have always wondered...what program did they use to make VB?

  2. #2
    Member 110359's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    43
    It's a lot easier to use the keydown event, however, if you want to you keyascii try this

    (considering keyascii letters start with a= 97)

    form_keyascii
    select case keycode(or whatever it is)
    case 100
    imgball.left = imgball.left - 500
    end select

    or you could set up a timer

    form_keyascii
    select case keycode
    case 100
    timer1.enabled = true
    end select

    timer1_timer
    imgball.left = imgball.left - 500

    110359
    Why is it that when you kill one man people call you a murderer and when you kill one thousand you are a conqueror?

  3. #3
    Member 110359's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    43
    sorry it's actually under form_keypress
    Why is it that when you kill one man people call you a murderer and when you kill one thousand you are a conqueror?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width