Solved

Scrolling a picture box

Posted on 2000-02-16
3
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month3 days, 23 hours left to enroll

630 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