Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse wheel
Message
From
14/08/2005 20:06:46
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01040747
Message ID:
01040857
Views:
18
Y'know, when a person presses F1 he should get a choice. Would you like VFP help or Mr. Berezniker.

It should also be said that the code has to go into the MouseWheel event of the IMAGE and not the form.

Thank you all.

>I have a form that displays a map. The form is much larger than the screen. I would like to be able to use the mouse wheel to move the map up and down the screen. Is there a way to accomplish this?

First, set the Scrollbar property of the form to 3 to enable scrollbars. In the ScrollWheel event of each control, you can put the following code:
Thisform.SetViewPort( Thisform.ViewPortLeft, Max(0,Thisform.ViewPortTop-Sign(m.nDirection)*16) )
This scrolls the form by 16 pixels each time you scroll the wheel. You can use BINDEVENT() to execute this code for every control without adding the code to each one.
I ain't skeert of nuttin eh?
Yikes! What was that?
Previous
Reply
Map
View

Click here to load this message in the networking platform