Are these on a UserForm?
I am developing a form for emergency dispatching. One of the features of this dispatch sheet is that there are several maps in it that open on a seperate form. The map form has 4 maps that are picture files in an image. these images are in a frame. The different images are selected using option buttons. Given the background above, my problem is this. I have code that zooms in 50% each time the Click event for the image is fired. wht i am trying to do is make the zoomed view center where i clicked. this is the code that i have so far but it doesn't work all that spectacular, the closer I zoom in the further out of center the place i clicked gets untill it is out of view.
Thanks for any help in advance,VB:Private Sub Layout_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) CurrentX = X CurrentY = Y End Sub Private Sub PlantLayout_Click() If Frame1.Zoom < 400 Then Frame1.Zoom = Frame1.Zoom + 50 frmmap.Frame1.ScrollLeft = CurrentX - (Frame1.Width / 2) frmmap.Frame1.ScrollTop = CurrentY - (Frame1.Height / 2) frmmap.Repaint End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)