|
-
Dec 2nd, 1999, 02:35 AM
#1
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] 
-
Dec 2nd, 1999, 02:46 AM
#2
Guru
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
-
Dec 2nd, 1999, 02:46 AM
#3
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
-
Dec 2nd, 1999, 02:47 AM
#4
Junior Member
The answer for the second question is, Set the redraw property of the picturebox to be true
Latha
-
Dec 2nd, 1999, 04:20 AM
#5
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] 
-
Dec 2nd, 1999, 08:14 AM
#6
Hyperactive Member
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]
-
Dec 2nd, 1999, 09:31 AM
#7
Addicted Member
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])
-
Dec 2nd, 1999, 10:42 AM
#8
Lively Member
i have no idea what your program is but i would appreciate it if you could give me copy as well.
-
Dec 2nd, 1999, 09:24 PM
#9
Hyperactive Member
-
Dec 3rd, 1999, 01:39 AM
#10
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|