Results 1 to 10 of 10

Thread: Turtle drawing !!!

  1. #1
    Guest

    Post

    1. Does anyone know a way of identifying the UP, DOWN, LEFT and RIGHT arrow keys in the keypress event?

    2. Does anyone know how to stop a picture box from being cleared when the form loses focus.
    my picture box goes blank each time the form is hiddn beneath another program.


    I really only need the up / down arrows to do a "Doskey"-type command-recalling sub routine.

    Both of the above questions relate to a program that i am writing, which is a clone of "LOGO" (remember the turtle
    drawing program?), i will happily send you a free copy of the finished article (not that i plan to sell it anyway).
    The program is in its final stages now, and this would really help me a lot!

    "Tilde bitter end!" ~&&


    ------------------

    Wossname,
    Email me: [email protected]

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    Up, Down, Left and Right keys get the vbKeyUp, vbKeyDown, vbKeyLeft and vbKeyRight key codes.

    To stop a picture from being cleared, set its AutoRedraw property to True.

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879
    AIM: RYoni69

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    For the arrow keys:
    You can use KeyDown, KeyUp event to check if on of those keys was pressed.

    Code:
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
        Select Case KeyCode
            Case vbKeyDown
                'Do your down key function
            Case vbKeyUp
                'Do your up key function
            Case vbKeyLeft
                'Do your left key function
            Case vbKeyRight
                'Do your right key function
        End Select
    End Sub
    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


  4. #4
    Junior Member
    Join Date
    Jun 1999
    Posts
    22

    Post

    The answer for the second question is, Set the redraw property of the picturebox to be true

    Latha

  5. #5
    Guest

    Post

    wow! 3 responses within 2 minutes of each other!!

    thanks guys, it seems so obvious now!

    I was trying everyting i could think of:

    vbLeftArrow, vbLArrow, vbLeftKey etc...

    and i was just testin' ya about the auto redraw thing i knew that already! (yeah, right woss!)

    Thanks again, Yonatan and Serge automatically get a copy of the LOGO clone (if they want one or not), and swarnalatha can have on too if he/she sends me his/her email addy!

    Watch out Mr. Gates, here i come!




    ------------------

    Wossname,
    Email me: [email protected]

  6. #6
    Hyperactive Member
    Join Date
    Sep 1999
    Posts
    305

    Post

    I remember logo. It was awesome. I remember doing it in 7th grade in math class and we had to synchronize it with music. Needless to say, mine was the best (programming is so much fun). I'm sorry I didn't get here soon enough to respond to your question, but I would really appreciate a copy of your program.

    Thanks,
    bob
    [email protected]

  7. #7
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Could l get a copy as well. Have been looking for over a year for a copy for my son. What l am attempting to do is produce a kind of cut down computer language to teach sub-teens the wonders of computing, (gee all those late nights non-responsive users etc).
    Regards,
    Jeff Ritchie ([email protected])

  8. #8
    Lively Member
    Join Date
    Jul 1999
    Posts
    99

    Post

    i have no idea what your program is but i would appreciate it if you could give me copy as well.

  9. #9
    Hyperactive Member onerrorgoto's Avatar
    Join Date
    Aug 1999
    Location
    Sweden
    Posts
    330

    Post

    I'm greedy
    I want two copies


    Just kidding, it would be cool to see your program since I cant recall ever using LOGO.

    If you need more help, dont hesitate to "call". I'm here everyday

    ------------------
    On Error Goto Bed :0)
    [email protected]




    [This message has been edited by onerrorgoto (edited 12-03-1999).]

  10. #10
    Guest

    Post

    ok fellas you got it!

    uhh tonio, dude could you, like, give me your addy or something.

    for those who dont know LOGO, youll know it when you see this. the only thing i havent been able to figure out yet is how to get the actual turtle on the screen! instead im using a label with the heading in text: 354 (degrees).

    ill do a readme file too, so it could take a few days to arrive, dont worry though it will eventually!

    ------------------

    Wossname,
    Email me: [email protected]

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