Solved

Scrolling a picture box

Posted on 2000-02-16
3
276 Views
Last Modified: 2008-03-03
Hello experts!

I'm using a VScrollBar and a HScrolBar to scroll a picture box, but I also want to scroll vertcally the picture box by using the keyboard keys arrow up and arrow down, and horizontally by using the keyboard keys arrow left and arrow right.

How could I do it?

Thanks in advance.
0
Comment
Question by:raulopez
3 Comments
 

Accepted Solution

by:
arfnarfsi earned 50 total points
ID: 2529109
Set the form's KeyPreview property to "True".  For the form's KeyPreview event, perform a Case Select for KeyAscii to equal vbKeyUp, vbKeyDown, vbKeyLeft and vbKeyRight.  For each of these, call/duplicate the subroutine for the scroll bars.
0
 
LVL 7

Expert Comment

by:Vbmaster
ID: 2529548
.. or increase/decrease the .Value property (instead of duplicating the subroutines).
0
 

Author Comment

by:raulopez
ID: 2532949
To: arfnarfsi

Sorry, but VB5 don't have form's KeyPreview event.

I've make the job in form's KeyCode event and works ok.

Thanks a lot for your answer.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question