Welcome to Dream.In.Code
Become a VB Expert!

Join 149,977 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,394 people online right now. Registration is fast and FREE... Join Now!




Moving shapes?

 
Reply to this topicStart new topic

Moving shapes?, Moving a shape by the click of a arrow key?

Green Link
15 Dec, 2007 - 09:17 AM
Post #1

New D.I.C Head
*

Joined: 15 Dec, 2007
Posts: 1


My Contributions
I am new to VB and cannot figure out how to get a object to move by pressing the arrowkeys. I need help quik.

This post has been edited by Green Link: 15 Dec, 2007 - 09:52 AM
User is offlineProfile CardPM
+Quote Post

LookNAO
RE: Moving Shapes?
28 Dec, 2007 - 12:15 PM
Post #2

D.I.C Head
**

Joined: 28 Dec, 2007
Posts: 66



Thanked: 1 times
My Contributions
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

Select Case KeyCode

Case 37
Shape1.Left = Shape1.Left - 5

Case 38
Shape1.Top = Shape1.Top - 5

Case 39
Shape1.Left = Shape1.Left + 5

Case 40
Shape1.Top = Shape1.Top + 5

End Select

End Sub
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 06:55PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month