Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 3 of 3

Thread: center on zoom in a frame

  1. #1
    Join Date
    15th July 2006
    Posts
    2

    center on zoom in a frame

    Hello,
    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.

    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 
    
    
    Thanks for any help in advance,
    S. Tibbetts

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,709

  3. #3
    Join Date
    15th July 2006
    Posts
    2

    Re: center on zoom in a frame

    yes, it is a userform called FrmMaps in a frame called Frame1 and one of the 4 images is called PlantLayout. Sorry I wasn't more specific.

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Draw Line From Center Of Cell To Center Of Another
    By beringer in forum EXCEL HELP
    Replies: 3
    Last Post: August 13th, 2008, 16:15
  2. Insert Image - Center & Zoom
    By Bryan021 in forum EXCEL HELP
    Replies: 11
    Last Post: January 30th, 2007, 03:13
  3. Replies: 1
    Last Post: November 17th, 2005, 05:45
  4. Checkboxes in frame
    By verrelli in forum EXCEL HELP
    Replies: 2
    Last Post: October 30th, 2005, 02:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno